Skip to content

Commit 4ffd4c7

Browse files
test: pin VTU
1 parent 4358e15 commit 4ffd4c7

File tree

3 files changed

+24
-33
lines changed

3 files changed

+24
-33
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
"@commitlint/cli": "^7.3.2",
6262
"@commitlint/config-conventional": "^7.3.1",
6363
"@nuxtjs/eslint-config": "^0.0.1",
64-
"@vue/server-test-utils": "^1.0.0-beta.28",
65-
"@vue/test-utils": "^1.0.0-beta.28",
64+
"@vue/server-test-utils": "1.0.0-beta.25",
65+
"@vue/test-utils": "1.0.0-beta.25",
6666
"babel-preset-vue-app": "^2.0.0",
6767
"cheerio": "^1.0.0-rc.2",
6868
"codecov": "^3.1.0",

test/VueLink.spec.js

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
/* eslint-disable no-console */
22
import { createLocalVue, mount, RouterLinkStub } from '@vue/test-utils'
33
import VueRouter from 'vue-router'
4-
import { VueLink, VueLinkAddSlash, VueLinkStripSlash, ForNuxt } from '../lib'
4+
import { ForNuxt, VueLink, VueLinkAddSlash, VueLinkStripSlash } from '../lib'
55

66
const localVue = createLocalVue()
77
localVue.use(VueRouter)
88

9-
const hiComponent = {
10-
name: 'hi-component',
11-
template: '<div>Hi</div>'
12-
}
9+
const hiComponent = '<div>Hi</div>'
1310

1411
describe('VueLink', () => {
1512
describe('router-link', () => {
@@ -61,7 +58,7 @@ describe('VueLink', () => {
6158
const link = wrapper.find(RouterLinkStub)
6259

6360
expect(link.vm.$props.to).toBe('/test')
64-
expect(wrapper.html()).toMatchSnapshot()
61+
expect(wrapper).toMatchSnapshot()
6562
})
6663
})
6764
describe('external', () => {
@@ -85,7 +82,7 @@ describe('VueLink', () => {
8582
expect(wrapper.isVueInstance()).toBe(false)
8683
expect(wrapper.contains(RouterLinkStub)).toBe(false)
8784

88-
expect(wrapper.html()).toMatchSnapshot()
85+
expect(wrapper).toMatchSnapshot()
8986
})
9087
it('does trigger external on https link', () => {
9188
const wrapper = mount(VueLink, {
@@ -107,7 +104,7 @@ describe('VueLink', () => {
107104
expect(wrapper.isVueInstance()).toBe(false)
108105
expect(wrapper.contains(RouterLinkStub)).toBe(false)
109106

110-
expect(wrapper.html()).toMatchSnapshot()
107+
expect(wrapper).toMatchSnapshot()
111108
})
112109
it('does trigger external on // link', () => {
113110
const wrapper = mount(VueLink, {
@@ -129,7 +126,7 @@ describe('VueLink', () => {
129126
expect(wrapper.isVueInstance()).toBe(false)
130127
expect(wrapper.contains(RouterLinkStub)).toBe(false)
131128

132-
expect(wrapper.html()).toMatchSnapshot()
129+
expect(wrapper).toMatchSnapshot()
133130
})
134131
it('does trigger external on external prop set', () => {
135132
const wrapper = mount(VueLink, {
@@ -152,7 +149,7 @@ describe('VueLink', () => {
152149
expect(wrapper.isVueInstance()).toBe(false)
153150
expect(wrapper.contains(RouterLinkStub)).toBe(false)
154151

155-
expect(wrapper.html()).toMatchSnapshot()
152+
expect(wrapper).toMatchSnapshot()
156153
})
157154
it('does set rel correctly', () => {
158155
const wrapper = mount(VueLink, {
@@ -175,7 +172,7 @@ describe('VueLink', () => {
175172
expect(wrapper.isVueInstance()).toBe(false)
176173
expect(wrapper.contains(RouterLinkStub)).toBe(false)
177174

178-
expect(wrapper.html()).toMatchSnapshot()
175+
expect(wrapper).toMatchSnapshot()
179176
})
180177
it('does set target on newTab correctly', () => {
181178
const wrapper = mount(VueLink, {
@@ -198,7 +195,7 @@ describe('VueLink', () => {
198195
expect(wrapper.isVueInstance()).toBe(false)
199196
expect(wrapper.contains(RouterLinkStub)).toBe(false)
200197

201-
expect(wrapper.html()).toMatchSnapshot()
198+
expect(wrapper).toMatchSnapshot()
202199
})
203200
it('does set target on prop correctly', () => {
204201
const wrapper = mount(VueLink, {
@@ -221,7 +218,7 @@ describe('VueLink', () => {
221218
expect(wrapper.isVueInstance()).toBe(false)
222219
expect(wrapper.contains(RouterLinkStub)).toBe(false)
223220

224-
expect(wrapper.html()).toMatchSnapshot()
221+
expect(wrapper).toMatchSnapshot()
225222
})
226223
it('does not bind href if unset', () => {
227224
const wrapper = mount(VueLink, {
@@ -238,7 +235,7 @@ describe('VueLink', () => {
238235
expect(wrapper.isVueInstance()).toBe(false)
239236
expect(wrapper.contains(RouterLinkStub)).toBe(false)
240237

241-
expect(wrapper.html()).toMatchSnapshot()
238+
expect(wrapper).toMatchSnapshot()
242239
})
243240
it('does bind custom prop', () => {
244241
const wrapper = mount(VueLink, {
@@ -260,7 +257,7 @@ describe('VueLink', () => {
260257
expect(wrapper.isVueInstance()).toBe(false)
261258
expect(wrapper.contains(RouterLinkStub)).toBe(false)
262259

263-
expect(wrapper.html()).toMatchSnapshot()
260+
expect(wrapper).toMatchSnapshot()
264261
})
265262
it('does bind classp', () => {
266263
const wrapper = mount(VueLink, {
@@ -280,7 +277,7 @@ describe('VueLink', () => {
280277
expect(wrapper.isVueInstance()).toBe(false)
281278
expect(wrapper.contains(RouterLinkStub)).toBe(false)
282279

283-
expect(wrapper.html()).toMatchSnapshot()
280+
expect(wrapper).toMatchSnapshot()
284281
})
285282
})
286283
})
@@ -335,7 +332,7 @@ describe('ForNuxt', () => {
335332
const link = wrapper.find(RouterLinkStub)
336333

337334
expect(link.vm.$props.to).toBe('/test')
338-
expect(wrapper.html()).toMatchSnapshot()
335+
expect(wrapper).toMatchSnapshot()
339336
})
340337
})
341338
})

yarn.lock

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -284,19 +284,18 @@
284284
resolved "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1"
285285
integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==
286286

287-
"@vue/server-test-utils@^1.0.0-beta.28":
288-
version "1.0.0-beta.28"
289-
resolved "https://registry.npmjs.org/@vue/server-test-utils/-/server-test-utils-1.0.0-beta.28.tgz#40adb6a6c05e8970cc5e5f0869eb490fa00d9cf3"
290-
integrity sha512-CrXQ2ISmLvye4HC4sIHqqR3Gyg02i8XcTwMAyIh+UY7fh1Nz4f9XE4LDsxg0B9uSGsSiR0lwphjlGtbUJjGl4A==
287+
288+
version "1.0.0-beta.25"
289+
resolved "https://registry.npmjs.org/@vue/server-test-utils/-/server-test-utils-1.0.0-beta.25.tgz#11e4ac087bb163bdab7cafd4c299377a4893c506"
290+
integrity sha512-4XyKCIkUcIP001bl3/HBHml//ls3T005+iFKquM8MmUKFe5sjai7eL5RHnXR7zXZat0g0ElmgBtfdO3li2zMgg==
291291
dependencies:
292292
cheerio "^1.0.0-rc.2"
293293

294-
"@vue/test-utils@^1.0.0-beta.28":
295-
version "1.0.0-beta.28"
296-
resolved "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.28.tgz#767c43413df8cde86128735e58923803e444b9a5"
297-
integrity sha512-uVbFJG0g/H9hf2pgWUdhvQYItRGzQ44cMFf00wp0YEo85pxuvM9e3mx8QLQfx6R2CogxbK4CvV7qvkLblehXeQ==
294+
295+
version "1.0.0-beta.25"
296+
resolved "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.25.tgz#4703076de3076bac42cdd242cd53e6fb8752ed8c"
297+
integrity sha512-mfvguEmEpAn0BuT4u+qm+0J1NTKgQS+ffUyWHY1QeSovIkJcy98fj1rO+PJgiZSEvGjjnDNX+qmofYFPLrofbA==
298298
dependencies:
299-
dom-event-types "^1.0.0"
300299
lodash "^4.17.4"
301300

302301
JSONStream@^1.0.4:
@@ -2009,11 +2008,6 @@ doctrine@^2.1.0:
20092008
dependencies:
20102009
esutils "^2.0.2"
20112010

2012-
dom-event-types@^1.0.0:
2013-
version "1.0.0"
2014-
resolved "https://registry.npmjs.org/dom-event-types/-/dom-event-types-1.0.0.tgz#5830a0a29e1bf837fe50a70cd80a597232813cae"
2015-
integrity sha512-2G2Vwi2zXTHBGqXHsJ4+ak/iP0N8Ar+G8a7LiD2oup5o4sQWytwqqrZu/O6hIMV0KMID2PL69OhpshLO0n7UJQ==
2016-
20172011
dom-serializer@0, dom-serializer@~0.1.0:
20182012
version "0.1.0"
20192013
resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"

0 commit comments

Comments
 (0)