Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/test_packagerWebExt.py

Issue 29600577: Issue 5997 - Avoid including qunit files in release builds (Closed)
Patch Set: Add assertions for qunit bundle Created Nov. 9, 2017, 3:32 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « templates/testIndex.html.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_packagerWebExt.py
diff --git a/tests/test_packagerWebExt.py b/tests/test_packagerWebExt.py
index f13ab10ac164a9055d06340d1d9b02c08339b598..22bafde9f70d58bb0c37f81de8725ed15984e1f0 100644
--- a/tests/test_packagerWebExt.py
+++ b/tests/test_packagerWebExt.py
@@ -231,12 +231,19 @@ def lib_files(tmpdir):
files['ext/a.js'] = 'require("./c.js");\nvar bar;'
files['lib/b.js'] = 'var foo;'
files['ext/c.js'] = 'var this_is_c;'
+ files['qunit/common.js'] = 'var qunit = {};'
+ files['qunit/tests/some_test.js'] = 'var passed = true;'
tmpdir.mkdir('lib').join('b.js').write(files['lib/b.js'])
ext_dir = tmpdir.mkdir('ext')
ext_dir.join('a.js').write(files['ext/a.js'])
ext_dir.join('c.js').write(files['ext/c.js'])
-
+ qunit_dir = tmpdir.mkdir('qunit')
+ qunit_dir.join('common.js').write(files['qunit/common.js'])
+ qunit_tests_dir = qunit_dir.mkdir('tests')
+ qunit_tests_dir.join('some_test.js').write(
+ files['qunit/tests/some_test.js']
+ )
return files
@@ -320,6 +327,8 @@ def assert_devenv_scripts(package, prefix, devenv):
assert (os.path.join(prefix, 'qunit/index.html') in filenames) == devenv
assert (os.path.join(prefix, 'devenvPoller__.js') in filenames) == devenv
assert (os.path.join(prefix, 'devenvVersion__') in filenames) == devenv
+ assert (os.path.join(prefix, 'qunit/tests.js') in filenames) == devenv
+ assert (os.path.join(prefix, 'qunit/tests.js.map') in filenames) == devenv
if devenv:
quint_index = package.read(os.path.join(prefix, 'qunit/index.html'))
« no previous file with comments | « templates/testIndex.html.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld