aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFraser Adams <fraser.adams@blueyonder.co.uk>2013-10-05 08:28:41 +0100
committerFraser Adams <fraser.adams@blueyonder.co.uk>2013-10-05 08:28:41 +0100
commit9bb6dc2d2c32d2a43af1e63e4dee48f4e24540b7 (patch)
tree2e99706e3730562aec62cba7bfc70eb8bb298dac /tests
parente851616ef033f58325141362dc139471531ab44b (diff)
change test_module_exports_with_closure to only execute the run_js test when engine == NODE_JS, this test is really checking that the module.exports stuff works in node
Diffstat (limited to 'tests')
-rw-r--r--tests/test_other.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index d4d2b7ec..95e0afe4 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -1929,8 +1929,10 @@ done.
# Check that test.js compiled with --closure 0 contains "module['exports'] = Module;"
assert "module['exports'] = Module;" in test_js_closure_0
- # Check that main.js (which includes test.js) completes successfully
- self.assertContained('bufferTest finished', run_js(path_from_root('tests', 'Module-exports', 'main.js')))
+ # Check that main.js (which requires test.js) completes successfully when run in node.js
+ # in order to check that the exports are indeed functioning correctly.
+ for engine in JS_ENGINES:
+ if engine == NODE_JS: self.assertContained('bufferTest finished', run_js(path_from_root('tests', 'Module-exports', 'main.js')))
# Delete test.js again and check it's gone.
try_delete(path_from_root('tests', 'Module-exports', 'test.js'))
@@ -1947,8 +1949,10 @@ done.
# "module['exports']" got minified to "module.exports" when compiling with --closure 1
assert "module.exports" in test_js_closure_1
- # Check that main.js (which includes test.js) completes successfully
- self.assertContained('bufferTest finished', run_js(path_from_root('tests', 'Module-exports', 'main.js')))
+ # Check that main.js (which requires test.js) completes successfully when run in node.js
+ # in order to check that the exports are indeed functioning correctly.
+ for engine in JS_ENGINES:
+ if engine == NODE_JS: self.assertContained('bufferTest finished', run_js(path_from_root('tests', 'Module-exports', 'main.js')))
# Tidy up files that might have been created by this test.
try_delete(path_from_root('tests', 'Module-exports', 'test.js'))