Commit Graph

166 Commits

Author SHA1 Message Date
Nicolò Ribaudo 03852c962b
Avoid duplicate binding import-source-binding-name.js (#4121) 2024-06-28 15:14:23 +02:00
Chengzhong Wu 8a2229cde8
Add tests for Source Phase Imports (#3980) 2024-06-27 14:58:04 +02:00
Nicolò Ribaudo c0e8eef81b
Add test for async module not blocking sync siblings (#3955) 2024-02-21 14:53:10 +01:00
Lucas Mirelmann 403ee414ab
Fix comment in allow-nlt-before-with.js (#4001)
The proposed syntax allows a line terminator before the `WithClause`.
2024-02-09 16:36:41 -08:00
Nicolò Ribaudo bebce4a5ee Make sure that the test always throws a SyntaxError 2024-01-15 15:16:53 -08:00
Nicolò Ribaudo 8b1bd25b49 Do not expect specific error type in import-attributes/allow-nlt-before-with.js
Hosts are free to throw whatever error they want during module loading: there is no guarantee that the error thrown due to the import with `type: "foo"` is a SyntaxError.
2024-01-15 15:16:53 -08:00
Nicolò Ribaudo 0a6dabf1e2 Add readmes 2023-10-26 18:21:19 -07:00
Nicolò Ribaudo 3ddb9e5e95 Update import attributes tests to use the `with` keyword 2023-10-26 18:21:19 -07:00
Nicolò Ribaudo 06f6ae960a Copy all import assertions tests as a basis for import attributes tests 2023-10-26 18:21:19 -07:00
André Bargull 989377d62d Fix import assertions tests
- Correct file paths in "ensure-linking-error_FIXTURE.js"
- Remove no longer valid assertion in "import-assertion-empty.js".

See also #3919.
2023-09-25 08:33:51 -07:00
Nicolò Ribaudo 1bb53aee3e
Update import attributes `assert` tests to current semantics (#3919)
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-13 11:35:06 +02:00
Nicolò Ribaudo 7ef1833109 Move all tests using import assertions to files named as such 2023-07-17 16:32:25 +02:00
José Julián Espina c4642dd714
Fix phase on some module tests (#3832) 2023-06-11 00:12:02 +02:00
Mike Pennisi 74de3d1d32 Correct spurious syntax errors
Prior to this commit, two tests for specific early errors also included
syntactically invalid `const` declarations. Implementations which
produced the expected syntax error due to these invalid declarations
would pass the tests regardless of whether they produced the early
errors that the tests were written to verify.

Correct the `const` declarations so that the tests verify the parsing
rule that they were designed to verify.
2022-06-17 10:29:52 +02:00
Mike Pennisi d9ddf80479 Revert "Merge pull request #3219 from tc39/rwaldron/migrate-comparearray"
This reverts commit b690cb67be, reversing
changes made to 50dd431dff. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
2021-10-01 10:18:47 -04:00
rwaldron 4847d9db5a chore: update test/**/*.js to use assert.compareArray wherever applicable 2021-09-24 12:58:15 -04:00
Mathieu Hofman 5fee61c9e8
Add test for freezing of module namespace object (#3213)
Attempting to freeze the module namespace exotic object should not affect the `writable`-ity of the properties as that exercises the same `DefineOwnProperty` operation according to [`SetIntegrityLevel`](https://tc39.es/ecma262/#sec-setintegritylevel).

@erights discovered a [bug in v8](https://bugs.chromium.org/p/v8/issues/detail?id=12240) where, while the `Object.freeze` operation throws, it actually makes exported properties non-writable one by one.

At the request of @syg, I'm contributing a test against this behavior. The bug in v8 actually leads to a breakage of the objects invariants, however I'm not testing for that here as the root cause is the illegal freezing of the export.
2021-09-23 19:36:37 -04:00
legendecas 206a3f4932 fixup! add other function variants 2021-08-25 10:32:55 -04:00
legendecas c1c1ed47db fixup! 2021-08-25 10:32:55 -04:00
legendecas ddff7c5ded Add test for duplicated top level function declarations in modules 2021-08-25 10:32:55 -04:00
Michael Dyck 52e7bfc4b6 "flags" is a top-level key, not a key within "negative" 2021-06-10 12:03:05 -04:00
Michael Dyck 675cad4aa3 Remove leading spaces from "---*/" line 2021-06-10 12:03:05 -04:00
jugglinmike 8183e9a629
Add test for TLA DFS invariant (#2989)
This behavior was introduced after the Top-Level Await proposal reached
stage 3: https://github.com/tc39/proposal-top-level-await/pull/159
2021-05-14 12:26:25 -04:00
Mike Pennisi 18834b2e19 Add tests for import assertions 2021-05-14 11:04:29 -04:00
Alexey Shvayka eca69e2c95 Test internal methods of module namespace objects with indices 2021-04-20 09:59:06 -04:00
Rick Waldron d6b342338e arbitrary-module-namespace-names: Assertion correction. Fixes gh-2866 2020-10-19 17:47:40 -04:00
Rick Waldron 3439564fca Add "☿" export to export-expname_FIXTURE.js. Fixes gh-2866 2020-10-17 09:19:45 -04:00
Rick Waldron 23f30e527a Move $DONOTEVALUATE() calls to correct position 2020-10-16 20:37:40 -04:00
Rick Waldron 487b77eda8 Fix gh-2866 2020-10-16 20:34:32 -04:00
Shu-yu Guo f38e55def4 Add SyntaxError tests for string literal export name 2020-10-16 20:32:10 -04:00
Gus Caplan ad8a5e9940 add Arbitrary module namespace names feature 2020-09-30 14:08:10 -04:00
Rick Waldron 70a39ad0fb Fix: test/language/module-code/export-expname_FIXTURE.js remove frontmatter. 2020-09-30 10:22:52 -04:00
Rick Waldron fd4ac46b34 Update test/language/module-code/export-expname-binding-string.js
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
2020-09-30 09:39:35 -04:00
Bradley Farias c43c9d8448 Exports can be Arbitrary Strings 2020-09-30 09:39:35 -04:00
Rick Waldron 5c753769e6 Fixup: remove duplicate tests 2020-09-14 13:35:13 -04:00
Frank Tang ab3a86d9b3 Move tests from
https://source.chromium.org/chromium/chromium/src/+/master:v8/test/test262/local-tests/
2020-09-14 13:35:13 -04:00
Rick Waldron 758b9ec575 Coverage: `new await ...` and `new (await ...)`. Fixes gh-1898 2020-09-10 16:09:50 -04:00
Rick Waldron ced63df97b
ExportDeclaration : HoistableDeclaration; Fixes gh-2068 (#2737) 2020-08-20 14:42:35 -07:00
yulia 058adfed86
update comments in instn-once.js (#2631) 2020-05-20 12:24:55 -07:00
Leo Balter eaf7f5d507
Fix exported bindings and ns (#2616)
Fixes #2614
2020-05-08 10:58:40 -07:00
Adrian Heine f2bc400f98 Add missing tests for export-star-as-ns-from-module 2020-05-06 11:56:17 -04:00
Gus Caplan 13d057dffc
fix namespace set test (#2574) 2020-04-10 15:17:03 -07:00
Gus Caplan b0bb917dc6 add dfs tests for https://github.com/tc39/ecma262/pull/1669 2020-03-23 14:31:57 -04:00
Nicolò Ribaudo 38709d0cca
Generate tests 2019-10-03 11:35:52 +02:00
Leo Balter 8d4c5f502f Generate tests 2019-09-27 13:23:44 -04:00
Leo Balter 2e82d31eac Add tests for evaluation and export declarations in TLA 2019-09-27 13:23:44 -04:00
Leo Balter 69bf8fb0f8 Update tests for top-level await 2019-09-27 13:23:44 -04:00
Leo Balter 32bb36f5e4 Tests for TLA module evaluation 2019-09-26 14:28:56 -04:00
Leo Balter b63cdfd4f4
Fix a test for TLA (#2319)
Fixes #2300
2019-08-29 17:20:50 -03:00
Caio Lima fbbab61b4a Adding cases to check if SyntaxError is thrown if AllPrivateIdentifiersValid returns false. (#2301) 2019-08-28 14:58:43 -03:00