Skip to content

Commit 89f7c26

Browse files
authored
Remove test_export_es6_allows_export_in_post_js. NFC (#23240)
This test was added in #13937. Here we are testing something that we actually decided we did not want to support. Specifically in #13894 we decided that `--extern-post-js` was the place to allow this. More importantly the resulting JS module simple doesn't work because in `MODULARIZE` mode the code from `--post-js` does not end up at the top level but instead inside a factory function. Note that this test does not try to exectute the resulting JS. If you try to execute it you get `SyntaxError: Unexpected token 'export'`. Since we don't support it I think its best to remove this test. I'm also working on a change to move the modularization code before acorn and closure, and with that change this won't even compile (because the modularization process puts all the code inside and inner scope).
1 parent e1be139 commit 89f7c26

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

test/export_module.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/test_other.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,6 @@ def test_export_es6_node_requires_import_meta(self):
425425
'-sENVIRONMENT=node', '-sEXPORT_ES6', '-sUSE_ES6_IMPORT_META=0'])
426426
self.assertContained('EXPORT_ES6 and ENVIRONMENT=*node* requires USE_ES6_IMPORT_META to be set', err)
427427

428-
def test_export_es6_allows_export_in_post_js(self):
429-
self.run_process([EMCC, test_file('hello_world.c'), '-O3', '-sEXPORT_ES6', '--post-js', test_file('export_module.js')])
430-
src = read_file('a.out.js')
431-
self.assertContained('export{doNothing};', src)
432-
433428
@parameterized({
434429
'': (False,),
435430
'package_json': (True,),

0 commit comments

Comments
 (0)