@@ -22,9 +22,9 @@ describe('html attributes', () => {
22
22
23
23
const htmlTag = document . documentElement ;
24
24
25
- expect ( htmlTag . getAttribute ( 'class' ) ) . toEqual ( 'myClassName' ) ;
26
- expect ( htmlTag . getAttribute ( 'lang' ) ) . toEqual ( 'en' ) ;
27
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'class,lang' ) ;
25
+ expect ( htmlTag . getAttribute ( 'class' ) ) . toBe ( 'myClassName' ) ;
26
+ expect ( htmlTag . getAttribute ( 'lang' ) ) . toBe ( 'en' ) ;
27
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'class,lang' ) ;
28
28
} ) ;
29
29
30
30
it ( 'sets attributes based on the deepest nested component' , ( ) => {
@@ -45,8 +45,8 @@ describe('html attributes', () => {
45
45
46
46
const htmlTag = document . documentElement ;
47
47
48
- expect ( htmlTag . getAttribute ( 'lang' ) ) . toEqual ( 'ja' ) ;
49
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'lang' ) ;
48
+ expect ( htmlTag . getAttribute ( 'lang' ) ) . toBe ( 'ja' ) ;
49
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'lang' ) ;
50
50
} ) ;
51
51
52
52
it ( 'handles valueless attributes' , ( ) => {
@@ -60,8 +60,8 @@ describe('html attributes', () => {
60
60
61
61
const htmlTag = document . documentElement ;
62
62
63
- expect ( htmlTag . getAttribute ( 'amp' ) ) . toEqual ( '' ) ;
64
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'amp' ) ;
63
+ expect ( htmlTag . getAttribute ( 'amp' ) ) . toBe ( '' ) ;
64
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'amp' ) ;
65
65
} ) ;
66
66
67
67
it ( 'clears html attributes that are handled within helmet' , ( ) => {
@@ -106,10 +106,10 @@ describe('html attributes', () => {
106
106
const htmlTag = document . documentElement ;
107
107
108
108
expect ( htmlTag . getAttribute ( 'amp' ) ) . toBeNull ( ) ;
109
- expect ( htmlTag . getAttribute ( 'lang' ) ) . toEqual ( 'ja' ) ;
110
- expect ( htmlTag . getAttribute ( 'id' ) ) . toEqual ( 'html-tag' ) ;
111
- expect ( htmlTag . getAttribute ( 'title' ) ) . toEqual ( 'html tag' ) ;
112
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'lang,id,title' ) ;
109
+ expect ( htmlTag . getAttribute ( 'lang' ) ) . toBe ( 'ja' ) ;
110
+ expect ( htmlTag . getAttribute ( 'id' ) ) . toBe ( 'html-tag' ) ;
111
+ expect ( htmlTag . getAttribute ( 'title' ) ) . toBe ( 'html tag' ) ;
112
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'lang,id,title' ) ;
113
113
} ) ;
114
114
115
115
it ( 'updates with multiple additions and removals - all new' , ( ) => {
@@ -135,9 +135,9 @@ describe('html attributes', () => {
135
135
136
136
expect ( htmlTag . getAttribute ( 'amp' ) ) . toBeNull ( ) ;
137
137
expect ( htmlTag . getAttribute ( 'lang' ) ) . toBeNull ( ) ;
138
- expect ( htmlTag . getAttribute ( 'id' ) ) . toEqual ( 'html-tag' ) ;
139
- expect ( htmlTag . getAttribute ( 'title' ) ) . toEqual ( 'html tag' ) ;
140
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'id,title' ) ;
138
+ expect ( htmlTag . getAttribute ( 'id' ) ) . toBe ( 'html-tag' ) ;
139
+ expect ( htmlTag . getAttribute ( 'title' ) ) . toBe ( 'html tag' ) ;
140
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'id,title' ) ;
141
141
} ) ;
142
142
143
143
describe ( 'initialized outside of helmet' , ( ) => {
@@ -151,7 +151,7 @@ describe('html attributes', () => {
151
151
152
152
const htmlTag = document . documentElement ;
153
153
154
- expect ( htmlTag . getAttribute ( 'test' ) ) . toEqual ( 'test' ) ;
154
+ expect ( htmlTag . getAttribute ( 'test' ) ) . toBe ( 'test' ) ;
155
155
expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBeNull ( ) ;
156
156
} ) ;
157
157
@@ -166,8 +166,8 @@ describe('html attributes', () => {
166
166
167
167
const htmlTag = document . documentElement ;
168
168
169
- expect ( htmlTag . getAttribute ( 'test' ) ) . toEqual ( 'helmet-attr' ) ;
170
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'test' ) ;
169
+ expect ( htmlTag . getAttribute ( 'test' ) ) . toBe ( 'helmet-attr' ) ;
170
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'test' ) ;
171
171
} ) ;
172
172
173
173
it ( 'attributes are cleared once managed in helmet' , ( ) => {
@@ -199,9 +199,9 @@ describe('html attributes', () => {
199
199
200
200
const htmlTag = document . documentElement ;
201
201
202
- expect ( htmlTag . getAttribute ( 'class' ) ) . toEqual ( 'myClassName' ) ;
203
- expect ( htmlTag . getAttribute ( 'lang' ) ) . toEqual ( 'en' ) ;
204
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'class,lang' ) ;
202
+ expect ( htmlTag . getAttribute ( 'class' ) ) . toBe ( 'myClassName' ) ;
203
+ expect ( htmlTag . getAttribute ( 'lang' ) ) . toBe ( 'en' ) ;
204
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'class,lang' ) ;
205
205
} ) ;
206
206
207
207
it ( 'sets attributes based on the deepest nested component' , ( ) => {
@@ -218,8 +218,8 @@ describe('html attributes', () => {
218
218
219
219
const htmlTag = document . documentElement ;
220
220
221
- expect ( htmlTag . getAttribute ( 'lang' ) ) . toEqual ( 'ja' ) ;
222
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'lang' ) ;
221
+ expect ( htmlTag . getAttribute ( 'lang' ) ) . toBe ( 'ja' ) ;
222
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'lang' ) ;
223
223
} ) ;
224
224
225
225
it ( 'handles valueless attributes' , ( ) => {
@@ -231,8 +231,8 @@ describe('html attributes', () => {
231
231
232
232
const htmlTag = document . documentElement ;
233
233
234
- expect ( htmlTag . getAttribute ( 'amp' ) ) . toEqual ( 'true' ) ;
235
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'amp' ) ;
234
+ expect ( htmlTag . getAttribute ( 'amp' ) ) . toBe ( 'true' ) ;
235
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'amp' ) ;
236
236
} ) ;
237
237
238
238
it ( 'clears html attributes that are handled within helmet' , ( ) => {
@@ -267,10 +267,10 @@ describe('html attributes', () => {
267
267
const htmlTag = document . documentElement ;
268
268
269
269
expect ( htmlTag . getAttribute ( 'amp' ) ) . toBeNull ( ) ;
270
- expect ( htmlTag . getAttribute ( 'lang' ) ) . toEqual ( 'ja' ) ;
271
- expect ( htmlTag . getAttribute ( 'id' ) ) . toEqual ( 'html-tag' ) ;
272
- expect ( htmlTag . getAttribute ( 'title' ) ) . toEqual ( 'html tag' ) ;
273
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'lang,id,title' ) ;
270
+ expect ( htmlTag . getAttribute ( 'lang' ) ) . toBe ( 'ja' ) ;
271
+ expect ( htmlTag . getAttribute ( 'id' ) ) . toBe ( 'html-tag' ) ;
272
+ expect ( htmlTag . getAttribute ( 'title' ) ) . toBe ( 'html tag' ) ;
273
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'lang,id,title' ) ;
274
274
} ) ;
275
275
276
276
it ( 'updates with multiple additions and removals - all new' , ( ) => {
@@ -290,9 +290,9 @@ describe('html attributes', () => {
290
290
291
291
expect ( htmlTag . getAttribute ( 'amp' ) ) . toBeNull ( ) ;
292
292
expect ( htmlTag . getAttribute ( 'lang' ) ) . toBeNull ( ) ;
293
- expect ( htmlTag . getAttribute ( 'id' ) ) . toEqual ( 'html-tag' ) ;
294
- expect ( htmlTag . getAttribute ( 'title' ) ) . toEqual ( 'html tag' ) ;
295
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'id,title' ) ;
293
+ expect ( htmlTag . getAttribute ( 'id' ) ) . toBe ( 'html-tag' ) ;
294
+ expect ( htmlTag . getAttribute ( 'title' ) ) . toBe ( 'html tag' ) ;
295
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'id,title' ) ;
296
296
} ) ;
297
297
298
298
describe ( 'initialized outside of helmet' , ( ) => {
@@ -306,7 +306,7 @@ describe('html attributes', () => {
306
306
307
307
const htmlTag = document . documentElement ;
308
308
309
- expect ( htmlTag . getAttribute ( 'test' ) ) . toEqual ( 'test' ) ;
309
+ expect ( htmlTag . getAttribute ( 'test' ) ) . toBe ( 'test' ) ;
310
310
expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBeNull ( ) ;
311
311
} ) ;
312
312
@@ -319,8 +319,8 @@ describe('html attributes', () => {
319
319
320
320
const htmlTag = document . documentElement ;
321
321
322
- expect ( htmlTag . getAttribute ( 'test' ) ) . toEqual ( 'helmet-attr' ) ;
323
- expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toEqual ( 'test' ) ;
322
+ expect ( htmlTag . getAttribute ( 'test' ) ) . toBe ( 'helmet-attr' ) ;
323
+ expect ( htmlTag . getAttribute ( HELMET_ATTRIBUTE ) ) . toBe ( 'test' ) ;
324
324
} ) ;
325
325
326
326
it ( 'cleared once it is managed in helmet' , ( ) => {
0 commit comments