Merge pull request #826 from nextcloud/vue/test-utils
Bump @vue/test-utils to v1.0.0-beta.31
This commit is contained in:
commit
05e92606e5
3 changed files with 13 additions and 13 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -4177,9 +4177,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vue/test-utils": {
|
"@vue/test-utils": {
|
||||||
"version": "1.0.0-beta.30",
|
"version": "1.0.0-beta.31",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.30.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.31.tgz",
|
||||||
"integrity": "sha512-Wyvcha9fNk8+kzTDwb3xWGjPkCPzHSYSwKP6MplrPTG/auhqoad7JqUEceZLc6u7AU4km2pPQ8/m9s0RgCZ0NA==",
|
"integrity": "sha512-IlhSx5hyEVnbvDZ3P98R1jNmy88QAd/y66Upn4EcvxSD5D4hwOutl3dIdfmSTSXs4b9DIMDnEVjX7t00cvOnvg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"dom-event-types": "^1.0.0",
|
"dom-event-types": "^1.0.0",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"contributors": [],
|
"contributors": [],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nextcloud/vue": "1.2.5",
|
"@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",
|
"axios": "^0.19.1",
|
||||||
"cdav-library": "github:nextcloud/cdav-library",
|
"cdav-library": "github:nextcloud/cdav-library",
|
||||||
"ical.js": "~1.3.0",
|
"ical.js": "~1.3.0",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import VueTestUtils from '@vue/test-utils'
|
import { config } from '@vue/test-utils'
|
||||||
import { OC } from './OC.js'
|
import { OC } from './OC.js'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import MockDate from 'mockdate'
|
import MockDate from 'mockdate'
|
||||||
|
@ -10,22 +10,22 @@ global.OC = new OC()
|
||||||
global.moment = moment
|
global.moment = moment
|
||||||
|
|
||||||
// Mock nextcloud translate functions
|
// Mock nextcloud translate functions
|
||||||
VueTestUtils.config.mocks.$t = function(app, string) {
|
config.mocks.$t = function(app, string) {
|
||||||
return string
|
return string
|
||||||
}
|
}
|
||||||
VueTestUtils.config.mocks.t = VueTestUtils.config.mocks.$t
|
config.mocks.t = config.mocks.$t
|
||||||
global.t = VueTestUtils.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
|
return singular
|
||||||
}
|
}
|
||||||
VueTestUtils.config.mocks.n = VueTestUtils.config.mocks.$n
|
config.mocks.n = config.mocks.$n
|
||||||
global.n = VueTestUtils.config.mocks.$n
|
global.n = config.mocks.$n
|
||||||
|
|
||||||
global.OCA = {}
|
global.OCA = {}
|
||||||
global.OCA.Tasks = {}
|
global.OCA.Tasks = {}
|
||||||
global.OCA.Tasks.$t = VueTestUtils.config.mocks.$t
|
global.OCA.Tasks.$t = config.mocks.$t
|
||||||
global.OCA.Tasks.$n = VueTestUtils.config.mocks.$n
|
global.OCA.Tasks.$n = config.mocks.$n
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
MockDate.reset()
|
MockDate.reset()
|
||||||
|
|
Loading…
Reference in a new issue