Merge pull request #826 from nextcloud/vue/test-utils

Bump @vue/test-utils to v1.0.0-beta.31
This commit is contained in:
Raimund Schlüßler 2020-01-25 21:42:30 +01:00 committed by GitHub
commit 05e92606e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 13 deletions

6
package-lock.json generated
View file

@ -4177,9 +4177,9 @@
}
},
"@vue/test-utils": {
"version": "1.0.0-beta.30",
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.30.tgz",
"integrity": "sha512-Wyvcha9fNk8+kzTDwb3xWGjPkCPzHSYSwKP6MplrPTG/auhqoad7JqUEceZLc6u7AU4km2pPQ8/m9s0RgCZ0NA==",
"version": "1.0.0-beta.31",
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.31.tgz",
"integrity": "sha512-IlhSx5hyEVnbvDZ3P98R1jNmy88QAd/y66Upn4EcvxSD5D4hwOutl3dIdfmSTSXs4b9DIMDnEVjX7t00cvOnvg==",
"requires": {
"dom-event-types": "^1.0.0",
"lodash": "^4.17.15",

View file

@ -26,7 +26,7 @@
"contributors": [],
"dependencies": {
"@nextcloud/vue": "1.2.5",
"@vue/test-utils": "^1.0.0-beta.30",
"@vue/test-utils": "^1.0.0-beta.31",
"axios": "^0.19.1",
"cdav-library": "github:nextcloud/cdav-library",
"ical.js": "~1.3.0",

View file

@ -1,4 +1,4 @@
import VueTestUtils from '@vue/test-utils'
import { config } from '@vue/test-utils'
import { OC } from './OC.js'
import moment from 'moment'
import MockDate from 'mockdate'
@ -10,22 +10,22 @@ global.OC = new OC()
global.moment = moment
// Mock nextcloud translate functions
VueTestUtils.config.mocks.$t = function(app, string) {
config.mocks.$t = function(app, string) {
return string
}
VueTestUtils.config.mocks.t = VueTestUtils.config.mocks.$t
global.t = VueTestUtils.config.mocks.$t
config.mocks.t = config.mocks.$t
global.t = config.mocks.$t
VueTestUtils.config.mocks.$n = function(app, singular, plural, count) {
config.mocks.$n = function(app, singular, plural, count) {
return singular
}
VueTestUtils.config.mocks.n = VueTestUtils.config.mocks.$n
global.n = VueTestUtils.config.mocks.$n
config.mocks.n = config.mocks.$n
global.n = config.mocks.$n
global.OCA = {}
global.OCA.Tasks = {}
global.OCA.Tasks.$t = VueTestUtils.config.mocks.$t
global.OCA.Tasks.$n = VueTestUtils.config.mocks.$n
global.OCA.Tasks.$t = config.mocks.$t
global.OCA.Tasks.$n = config.mocks.$n
afterAll(() => {
MockDate.reset()