Skip to content

Commit 293b8df

Browse files
authored
Add use of @requires_dev_dependency to browser tests. (#25261)
This allows skipping tests that aren't in `npm ci --production` packages.
1 parent d173fde commit 293b8df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test_browser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from common import read_file, EMRUN, no_wasm64, no_2gb, no_4gb, copytree
2424
from common import requires_wasm2js, parameterize, find_browser_test_file, with_all_sjlj
2525
from common import also_with_minimal_runtime, also_with_wasm2js, also_with_asan, also_with_wasmfs
26-
from common import HttpServerThread
26+
from common import HttpServerThread, requires_dev_dependency
2727
from tools import shared
2828
from tools import ports
2929
from tools.shared import EMCC, WINDOWS, FILE_PACKAGER, PIPE, DEBUG
@@ -5503,6 +5503,7 @@ def test_error_reporting(self):
55035503
'': ([],),
55045504
'es6': (['-sEXPORT_ES6', '-pthread', '-sPTHREAD_POOL_SIZE=1'],),
55055505
})
5506+
@requires_dev_dependency('webpack')
55065507
def test_webpack(self, args):
55075508
if '-sEXPORT_ES6' in args:
55085509
copytree(test_file('webpack_es6'), '.')
@@ -5519,13 +5520,15 @@ def test_webpack(self, args):
55195520
self.run_browser('dist/index.html', '/report_result?exit:0')
55205521

55215522
@also_with_threads
5523+
@requires_dev_dependency('vite')
55225524
def test_vite(self):
55235525
copytree(test_file('vite'), '.')
55245526
self.compile_btest('hello_world.c', ['-sEXIT_RUNTIME', '-sENVIRONMENT=web', '-o', 'hello.mjs'])
55255527
self.run_process(shared.get_npm_cmd('vite') + ['build'])
55265528
self.run_browser('dist/index.html', '/report_result?exit:0')
55275529

55285530
@also_with_threads
5531+
@requires_dev_dependency('rollup')
55295532
def test_rollup(self):
55305533
copytree(test_file('rollup'), '.')
55315534
self.compile_btest('hello_world.c', ['-sEXIT_RUNTIME', '-sENVIRONMENT=web', '-o', 'hello.mjs'])

0 commit comments

Comments
 (0)