-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up internal test/ directory structure #1511
Labels
Comments
Krinkle
added
Type: Enhancement
New idea or feature request.
Category: Tests
help welcome
labels
Nov 17, 2020
Krinkle
added a commit
that referenced
this issue
Nov 17, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465.
Krinkle
added a commit
that referenced
this issue
Nov 17, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465.
Krinkle
added a commit
that referenced
this issue
Nov 18, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465.
Krinkle
added a commit
that referenced
this issue
Nov 18, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465.
Krinkle
added a commit
that referenced
this issue
Nov 18, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465.
Krinkle
added a commit
that referenced
this issue
Nov 18, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465.
Krinkle
added a commit
that referenced
this issue
Nov 20, 2020
Krinkle
added a commit
that referenced
this issue
Nov 20, 2020
Krinkle
added a commit
that referenced
this issue
Nov 20, 2020
Krinkle
added a commit
that referenced
this issue
Nov 22, 2020
From #1516:
|
Krinkle
added a commit
that referenced
this issue
Nov 23, 2020
Our internal tests mostly predate support for nested modules so that's why these are mostly flat and messy. Re-structure them so that related tests are under the same module. This makes it easier to scan the results and to re-run tests in a given file. Also: * Use assert.test instead of QUnit.config.current where possible. * Remove redundant use of assert.expect() from most tests. * Remove some duplicate tests. * Clarify local name in setTimeout.js as globalThis instead of window, since the test is used in Node.js as well. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Nov 23, 2020
Our internal tests mostly predate support for nested modules so that's why these are mostly flat and messy. Re-structure them so that related tests are under the same module. This makes it easier to scan the results and to re-run tests in a given file. Also: * Use assert.test instead of QUnit.config.current where possible. * Remove redundant use of assert.expect() from most tests. * Remove some duplicate tests. * Clarify local name in setTimeout.js as globalThis instead of window, since the test is used in Node.js as well. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Nov 23, 2020
The test suite in this HTML file is already covered by the main test/index.html file, as well as by the test-on-node task. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Nov 28, 2020
* Rename test/es2017 and update ESLint config to allow for import/export syntax to be used. We don't rely on ESLint to know what is supported in Node.js, our test matrix in CI covers that already. We should probably re-think the way these tests are organized, which I've filed #1511 for. * Update eslint config for src/cli to es2020. The dynamic `import()` statement was only spe'ced in es2020. This is first implemented (without experimental flag) in Node 12. We need to support Node 10. However it looks like Node 10 already tolerated this (maybe it sees it as a normal function, or maybe it was already recognised by the V8 parser it shipped with), so the try-catch suffices there. Again, the CI test matrix verifies for us that stuff works fine on older versions. Ref #1465. Closes #1510.
Krinkle
added a commit
that referenced
this issue
Jun 5, 2021
Krinkle
added a commit
that referenced
this issue
Jun 5, 2021
Krinkle
added a commit
that referenced
this issue
Jun 6, 2021
It just had one inline call to setTimeout in one of the test cases, which is easily changed to use our local `defer` function instead. After that, it passed. While at it, simplify and synchronise the two mock-promise functions. Not yet worth abstracting I think, but thinking about it. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Jun 6, 2021
It just had one inline call to setTimeout in one of the test cases, which is easily changed to use our local `defer` function instead. After that, it passed. While at it, simplify and synchronise the two mock-promise functions. Not yet worth abstracting I think, but thinking about it. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Jun 7, 2021
It just had one inline call to setTimeout in one of the test cases, which is easily changed to use our local `defer` function instead. After that, it passed. While at it, simplify and synchronise the two mock-promise functions. Not yet worth abstracting I think, but thinking about it. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Jun 7, 2021
It just had one inline call to setTimeout in one of the test cases, which is easily changed to use our local `defer` function instead. After that, it passed. While at it, simplify and synchronise the two mock-promise functions. Not yet worth abstracting I think, but thinking about it. Ref #1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Jun 28, 2021
The next commit in this branch for qunitjs#1511, will disallow adding tests if `QUnit.done()` and `runEnd` have already happened, thus leading these hacks to fail as follows: ```` Running "qunit:all" (qunit) task Testing http://localhost:4000/test/index.html […] Testing http://localhost:4000/test/module-skip.html .... Error: Unexpected new test after the run already ended at new Test (http://localhost:4000/qunit/qunit.js:2206:13) ^C ``` In addition, due to a known issue in grunt-contrib-qunit, these would also indefinitely hack instead of actually failing. Ref gruntjs/grunt-contrib-qunit#178. Ref qunitjs#1377. Ref qunitjs#1511.
Krinkle
added a commit
that referenced
this issue
Jul 3, 2021
The next commit in this branch for #1511, will disallow adding tests if `QUnit.done()` and `runEnd` have already happened, thus leading these hacks to fail as follows: ```` Running "qunit:all" (qunit) task Testing http://localhost:4000/test/index.html […] Testing http://localhost:4000/test/module-skip.html .... Error: Unexpected new test after the run already ended at new Test (http://localhost:4000/qunit/qunit.js:2206:13) ^C ``` In addition, due to a known issue in grunt-contrib-qunit, these would also indefinitely hack instead of actually failing. Ref gruntjs/grunt-contrib-qunit#178. Ref #1377. Ref #1511.
Lines 139 to 151 in 66081d6
As of #1629, the |
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Aug 8, 2021
* This additional entry point is no longer needed now. It was already redundant with test/index.html. * Rename the file to match the `QUnit.module()` call. * Include it in the test run for mozjs (previously it was only in index.html and test-on-node). Ref qunitjs#1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
The file was mixed in the main/ directory, but not actually used by any of the main test runs (index.html, test-on-node, mozjs). Ref #1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
Several of the HTML test suites were previously omitted from CI, as they either couldn't pass on PhantomJS, or were simply forgotten. * Add test/headless.html. Also updated to use `QUnit.on()`, and to hide debug messages when run in CI to avoid adding this noise. * Add test/module-filter.html * Add test/performance-mark.html * Add test/webWorker.html. Ref #1171. * Remove test/each.html. Duplicate of test/index.html. * Remove test/stack-errors.html. Redundant with other tests for "noglobals" and "onUncaughtError" outside test context etc. * Improve test/sandboxed-iframe.html, which was passing CI but failing manually, due to undefined `__grunt_contrib_qunit__`. We now define a fallback locally to ease debugging. Added to test-on-node: test/module-skip.js, test/module-todo.js. These were disabled due to use of hacky `QUnit.done()`, but that was recently fixed with 78bda44. Also add various main tests to test/webWorker.js, which had not been updated in a while. The next commit will add a meta CLI test that ensures that these are all in sync to avoid staleness in the future. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
Bump cli/eslintrc from es2017 to es2018 to allow use of the RegExp `s` flag (dotAll). This is supported since Node 8+. Ref #1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Aug 9, 2021
Several of the HTML test suites were previously omitted from CI, as they either couldn't pass on PhantomJS, or were simply forgotten. * Add test/headless.html. Also updated to use `QUnit.on()`, and to hide debug messages when run in CI to avoid adding this noise. * Add test/module-filter.html * Add test/performance-mark.html. Ref qunitjs#1319. * Add test/webWorker.html. Ref qunitjs#1171. * Remove test/each.html. Duplicate of test/index.html. * Remove test/stack-errors.html. Redundant with other tests for "noglobals" and "onUncaughtError" outside test context etc. * Improve test/sandboxed-iframe.html, which was passing CI but failing manually, due to undefined `__grunt_contrib_qunit__`. We now define a fallback locally to ease debugging. Added to test-on-node: test/module-skip.js, test/module-todo.js. These were disabled due to use of hacky `QUnit.done()`, but that was recently fixed with 78bda44. Also add various main tests to test/webWorker.js, which had not been updated in a while. The next commit will add a meta CLI test that ensures that these are all in sync to avoid staleness in the future. Ref qunitjs#1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Aug 9, 2021
Bump cli/eslintrc from es2017 to es2018 to allow use of the RegExp `s` flag (dotAll). This is supported since Node 8+. Ref qunitjs#1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Aug 9, 2021
Several of the HTML test suites were previously omitted from CI, as they either couldn't pass on PhantomJS, or were simply forgotten. * Add test/headless.html. Also updated to use `QUnit.on()`, and to hide debug messages when run in CI to avoid adding this noise. * Add test/module-filter.html * Add test/performance-mark.html. Ref qunitjs#1319. * Add test/webWorker.html. Ref qunitjs#1171. * Remove test/each.html. Duplicate of test/index.html. * Remove test/stack-errors.html. Redundant with other tests for "noglobals" and "onUncaughtError" outside test context etc. * Improve test/sandboxed-iframe.html, which was passing CI but failing manually, due to undefined `__grunt_contrib_qunit__`. We now define a fallback locally to ease debugging. Added to test-on-node: test/module-skip.js, test/module-todo.js. These were disabled due to use of hacky `QUnit.done()`, but that was recently fixed with 78bda44. Also add various main tests to test/webWorker.js, which had not been updated in a while. The next commit will add a meta CLI test that ensures that these are all in sync to avoid staleness in the future. Ref qunitjs#1511.
Krinkle
added a commit
to Krinkle/qunit
that referenced
this issue
Aug 9, 2021
Bump cli/eslintrc from es2017 to es2018 to allow use of the RegExp `s` flag (dotAll). This is supported since Node 8+. Ref qunitjs#1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
* This additional entry point is no longer needed now. It was already redundant with test/index.html. * Rename the file to match the `QUnit.module()` call. * Include it in the test run for mozjs (previously it was only in index.html and test-on-node). Ref #1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
The file was mixed in the main/ directory, but not actually used by any of the main test runs (index.html, test-on-node, mozjs). Ref #1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
Several of the HTML test suites were previously omitted from CI, as they either couldn't pass on PhantomJS, or were simply forgotten. * Add test/headless.html. Also updated to use `QUnit.on()`, and to hide debug messages when run in CI to avoid adding this noise. * Add test/module-filter.html * Add test/performance-mark.html. Ref #1319. * Add test/webWorker.html. Ref #1171. * Remove test/each.html. Duplicate of test/index.html. * Remove test/stack-errors.html. Redundant with other tests for "noglobals" and "onUncaughtError" outside test context etc. * Improve test/sandboxed-iframe.html, which was passing CI but failing manually, due to undefined `__grunt_contrib_qunit__`. We now define a fallback locally to ease debugging. Added to test-on-node: test/module-skip.js, test/module-todo.js. These were disabled due to use of hacky `QUnit.done()`, but that was recently fixed with 78bda44. Also add various main tests to test/webWorker.js, which had not been updated in a while. The next commit will add a meta CLI test that ensures that these are all in sync to avoid staleness in the future. Ref #1511.
Krinkle
added a commit
that referenced
this issue
Aug 9, 2021
Bump cli/eslintrc from es2017 to es2018 to allow use of the RegExp `s` flag (dotAll). This is supported since Node 8+. Ref #1511.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We currently have many ways we run unit tests:
Outcome for this issue:
npm test
.For later:
The text was updated successfully, but these errors were encountered: