@@ -58,27 +58,27 @@ test('generates source maps using src attributes', () => {
58
58
59
59
test ( 'processes .vue file using jsx' , ( ) => {
60
60
const wrapper = mount ( Jsx )
61
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
61
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
62
62
} )
63
63
64
64
test ( 'processes extended functions' , ( ) => {
65
65
const wrapper = mount ( Constructor )
66
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
66
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
67
67
} )
68
68
69
69
test ( 'processes .vue file with lang set to coffee' , ( ) => {
70
70
const wrapper = mount ( Coffee )
71
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
71
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
72
72
} )
73
73
74
74
test ( 'processes .vue file with lang set to coffeescript' , ( ) => {
75
75
const wrapper = mount ( CoffeeScript )
76
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
76
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
77
77
} )
78
78
79
79
test ( 'processes .vue files with lang set to typescript' , ( ) => {
80
80
const wrapper = mount ( TypeScript )
81
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
81
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
82
82
} )
83
83
84
84
test ( 'processes functional components' , ( ) => {
@@ -106,29 +106,29 @@ test('processes SFC with functional template from parent', () => {
106
106
107
107
test ( 'handles missing script block' , ( ) => {
108
108
const wrapper = mount ( NoScript )
109
- expect ( wrapper . contains ( 'footer' ) )
109
+ expect ( wrapper . element . tagName ) . toBe ( 'FOOTER' )
110
110
} )
111
111
112
112
test ( 'processes .vue file with jade template' , ( ) => {
113
113
const wrapper = mount ( Jade )
114
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
114
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
115
115
expect ( wrapper . classes ( ) ) . toContain ( 'jade' )
116
116
} )
117
117
118
118
test ( 'processes pug templates' , ( ) => {
119
119
const wrapper = mount ( Pug )
120
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
120
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
121
121
expect ( wrapper . classes ( ) ) . toContain ( 'pug-base' )
122
122
expect ( wrapper . find ( '.pug-extended' ) . exists ( ) ) . toBeTruthy ( )
123
123
} )
124
124
125
125
test ( 'supports relative paths when extending templates from .pug files' , ( ) => {
126
126
const wrapper = mount ( PugRelative )
127
- expect ( wrapper . is ( 'div' ) ) . toBeTruthy ( )
127
+ expect ( wrapper . element . tagName ) . toBe ( 'DIV' )
128
128
expect ( wrapper . find ( '.pug-relative-base' ) . exists ( ) ) . toBeTruthy ( )
129
129
} )
130
130
131
131
test ( 'processes SFC with no template' , ( ) => {
132
132
const wrapper = mount ( RenderFunction )
133
- expect ( wrapper . is ( 'section' ) ) . toBe ( true )
133
+ expect ( wrapper . element . tagName ) . toBe ( 'SECTION' )
134
134
} )
0 commit comments