Skip to content

Commit 7fe4268

Browse files
committed
test: replace deprecated functions
1 parent 0897fcd commit 7fe4268

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

e2e/__projects__/basic/test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,27 @@ test('generates source maps using src attributes', () => {
5858

5959
test('processes .vue file using jsx', () => {
6060
const wrapper = mount(Jsx)
61-
expect(wrapper.is('div')).toBeTruthy()
61+
expect(wrapper.element.tagName).toBe('DIV')
6262
})
6363

6464
test('processes extended functions', () => {
6565
const wrapper = mount(Constructor)
66-
expect(wrapper.is('div')).toBeTruthy()
66+
expect(wrapper.element.tagName).toBe('DIV')
6767
})
6868

6969
test('processes .vue file with lang set to coffee', () => {
7070
const wrapper = mount(Coffee)
71-
expect(wrapper.is('div')).toBeTruthy()
71+
expect(wrapper.element.tagName).toBe('DIV')
7272
})
7373

7474
test('processes .vue file with lang set to coffeescript', () => {
7575
const wrapper = mount(CoffeeScript)
76-
expect(wrapper.is('div')).toBeTruthy()
76+
expect(wrapper.element.tagName).toBe('DIV')
7777
})
7878

7979
test('processes .vue files with lang set to typescript', () => {
8080
const wrapper = mount(TypeScript)
81-
expect(wrapper.is('div')).toBeTruthy()
81+
expect(wrapper.element.tagName).toBe('DIV')
8282
})
8383

8484
test('processes functional components', () => {
@@ -106,29 +106,29 @@ test('processes SFC with functional template from parent', () => {
106106

107107
test('handles missing script block', () => {
108108
const wrapper = mount(NoScript)
109-
expect(wrapper.contains('footer'))
109+
expect(wrapper.element.tagName).toBe('FOOTER')
110110
})
111111

112112
test('processes .vue file with jade template', () => {
113113
const wrapper = mount(Jade)
114-
expect(wrapper.is('div')).toBeTruthy()
114+
expect(wrapper.element.tagName).toBe('DIV')
115115
expect(wrapper.classes()).toContain('jade')
116116
})
117117

118118
test('processes pug templates', () => {
119119
const wrapper = mount(Pug)
120-
expect(wrapper.is('div')).toBeTruthy()
120+
expect(wrapper.element.tagName).toBe('DIV')
121121
expect(wrapper.classes()).toContain('pug-base')
122122
expect(wrapper.find('.pug-extended').exists()).toBeTruthy()
123123
})
124124

125125
test('supports relative paths when extending templates from .pug files', () => {
126126
const wrapper = mount(PugRelative)
127-
expect(wrapper.is('div')).toBeTruthy()
127+
expect(wrapper.element.tagName).toBe('DIV')
128128
expect(wrapper.find('.pug-relative-base').exists()).toBeTruthy()
129129
})
130130

131131
test('processes SFC with no template', () => {
132132
const wrapper = mount(RenderFunction)
133-
expect(wrapper.is('section')).toBe(true)
133+
expect(wrapper.element.tagName).toBe('SECTION')
134134
})

e2e/__projects__/style/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import External from './components/External.vue'
88

99
test('processes Less', () => {
1010
const wrapper = mount(Less)
11-
expect(wrapper.is('div')).toBeTruthy()
11+
expect(wrapper.element.tagName).toBe('DIV')
1212
expect(wrapper.vm.$style.a).toEqual('a')
1313
})
1414

1515
test('processes PostCSS', () => {
1616
const wrapper = mount(PostCss)
17-
expect(wrapper.is('section')).toBeTruthy()
17+
expect(wrapper.element.tagName).toBe('SECTION')
1818
expect(wrapper.vm.$style.a).toEqual('a')
1919
expect(wrapper.vm.$style.b).toEqual('b')
2020
})

0 commit comments

Comments
 (0)