@@ -207,8 +207,8 @@ def test_unicorn_render_component_one_script_tag(settings):
207
207
context = {}
208
208
html = unicorn_node .render (context )
209
209
210
- assert " <script" in html
211
- assert len (re .findall (" <script" , html )) == 1
210
+ assert ' <script type="module"' in html
211
+ assert len (re .findall (' <script type="module"' , html )) == 1
212
212
213
213
214
214
def test_unicorn_render_child_component_no_script_tag (settings ):
@@ -235,8 +235,8 @@ def test_unicorn_render_parent_component_one_script_tag(settings):
235
235
context = {}
236
236
html = unicorn_node .render (context )
237
237
238
- assert " <script" in html
239
- assert len (re .findall (" <script" , html )) == 1
238
+ assert ' <script type="module"' in html
239
+ assert len (re .findall (' <script type="module"' , html )) == 1
240
240
241
241
242
242
def test_unicorn_render_calls (settings ):
@@ -249,8 +249,8 @@ def test_unicorn_render_calls(settings):
249
249
context = {}
250
250
html = unicorn_node .render (context )
251
251
252
- assert " <script" in html
253
- assert len (re .findall (" <script" , html )) == 1
252
+ assert ' <script type="module"' in html
253
+ assert len (re .findall (' <script type="module"' , html )) == 1
254
254
assert '"calls":[{"fn":"testCall","args":[]}]' in html
255
255
256
256
@@ -264,8 +264,8 @@ def test_unicorn_render_calls_with_arg(settings):
264
264
context = {}
265
265
html = unicorn_node .render (context )
266
266
267
- assert " <script" in html
268
- assert len (re .findall (" <script" , html )) == 1
267
+ assert ' <script type="module"' in html
268
+ assert len (re .findall (' <script type="module"' , html )) == 1
269
269
assert '"calls":[{"fn":"testCall2","args":["hello"]}]' in html
270
270
271
271
@@ -279,8 +279,8 @@ def test_unicorn_render_calls_no_mount_call(settings):
279
279
context = {}
280
280
html = unicorn_node .render (context )
281
281
282
- assert " <script" in html
283
- assert len (re .findall (" <script" , html )) == 1
282
+ assert ' <script type="module"' in html
283
+ assert len (re .findall (' <script type="module"' , html )) == 1
284
284
assert '"calls":[]' in html
285
285
286
286
@@ -294,8 +294,8 @@ def test_unicorn_render_hash(settings):
294
294
context = {}
295
295
html = unicorn_node .render (context )
296
296
297
- assert " <script" in html
298
- assert len (re .findall (" <script" , html )) == 1
297
+ assert ' <script type="module"' in html
298
+ assert len (re .findall (' <script type="module"' , html )) == 1
299
299
assert '"hash":"' in html
300
300
301
301
# Assert that the content hash is correct
0 commit comments