34
34
from common import RunnerCore, path_from_root, is_slow_test, ensure_dir, disabled, make_executable
35
35
from common import env_modify, no_mac, no_windows, only_windows, requires_native_clang, with_env_modify
36
36
from common import create_file, parameterized, NON_ZERO, node_pthreads, TEST_ROOT, test_file
37
- from common import compiler_for, EMBUILDER, requires_v8, requires_node, requires_wasm64, requires_node_canary
37
+ from common import compiler_for, EMBUILDER, requires_v8, requires_node, requires_wasm64, requires_node_canary, requires_dev_dependency
38
38
from common import requires_wasm_eh, crossplatform, with_all_eh_sjlj, with_all_sjlj, requires_jspi
39
39
from common import also_with_standalone_wasm, also_with_wasm2js, also_with_noderawfs
40
40
from common import also_with_modularize, also_with_wasmfs, with_all_fs
@@ -3463,6 +3463,7 @@ def test_jspi_add_function(self):
3463
3463
'-Wno-experimental']
3464
3464
self.do_runf('other/test_jspi_add_function.c', 'done')
3465
3465
3466
+ @requires_dev_dependency('typescript')
3466
3467
@parameterized({
3467
3468
'commonjs': [['-sMODULARIZE'], ['--module', 'commonjs', '--moduleResolution', 'node']],
3468
3469
'esm': [['-sEXPORT_ES6'], ['--module', 'NodeNext', '--moduleResolution', 'nodenext']],
@@ -3488,6 +3489,7 @@ def test_embind_tsgen_end_to_end(self, opts, tsc_opts):
3488
3489
self.assertContained('main ran\nts ran', self.run_js('main.js'))
3489
3490
3490
3491
@is_slow_test
3492
+ @requires_dev_dependency('typescript')
3491
3493
def test_embind_tsgen_ignore(self):
3492
3494
create_file('fail.js', 'assert(false);')
3493
3495
self.emcc_args += ['-lembind', '--emit-tsd', 'embind_tsgen.d.ts']
@@ -3634,6 +3636,7 @@ def test_embind_jsgen_method_pointer_stability(self):
3634
3636
# AOT JS generation still works correctly.
3635
3637
self.do_runf('other/embind_jsgen_method_pointer_stability.cpp', 'done')
3636
3638
3639
+ @requires_dev_dependency('typescript')
3637
3640
def test_emit_tsd(self):
3638
3641
self.run_process([EMCC, test_file('other/test_emit_tsd.c'),
3639
3642
'--emit-tsd', 'test_emit_tsd.d.ts', '-sEXPORT_ES6',
@@ -3645,6 +3648,7 @@ def test_emit_tsd(self):
3645
3648
cmd = shared.get_npm_cmd('tsc') + [test_file('other/test_tsd.ts'), '--noEmit']
3646
3649
shared.check_call(cmd)
3647
3650
3651
+ @requires_dev_dependency('typescript')
3648
3652
def test_emit_tsd_sync_compilation(self):
3649
3653
self.run_process([EMCC, test_file('other/test_emit_tsd.c'),
3650
3654
'--emit-tsd', 'test_emit_tsd_sync.d.ts',
@@ -14389,6 +14393,7 @@ def test_hello_function(self):
14389
14393
'O3': (['-O3'],),
14390
14394
})
14391
14395
@crossplatform
14396
+ @requires_dev_dependency('es-check')
14392
14397
def test_es5_transpile(self, args):
14393
14398
self.emcc_args += ['-Wno-transpile'] + args
14394
14399
@@ -16030,6 +16035,7 @@ def test_late_module_api_assignment(self):
16030
16035
self.do_runf('hello_world.c', expected, emcc_args=['--post-js=post.js', '-sWASM_ASYNC_COMPILATION=0'], assert_returncode=NON_ZERO)
16031
16036
16032
16037
@crossplatform
16038
+ @requires_dev_dependency('rollup')
16033
16039
def test_rollup(self):
16034
16040
copytree(test_file('rollup_node'), '.')
16035
16041
self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORT_ES6', '-sEXIT_RUNTIME', '-sENVIRONMENT=node', '-sMODULARIZE', '-o', 'hello.mjs'])
0 commit comments