Skip to content

Commit 339192d

Browse files
committed
Add glob pattern for Temporal-related 402 tests
Apparently there are a few more temporal-related tests. This commit adds a glob pattern to the default list of tests in order to run these tests.
1 parent a348c20 commit 339192d

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"cSpell.words": [
3+
"emporal",
34
"NOINPUT",
45
"runtest"
56
]

index.mjs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ import yaml from 'js-yaml';
4040
* the global namespace, as well as Temporal-related changes polyfilled into
4141
* `Intl` and `Date` built-in objects.
4242
* @property {string} test262Dir Root directory of the test262 submodule repo.
43-
* @property {string[]=} testGlobs If omitted, all tests will be run. This
44-
* option provides glob patterns that specify a subset of tests to be run.
45-
* Globs are resolved relative to `test/**∕Temporal/` subdirectories of
43+
* @property {string[]=} testGlobs If omitted, all Temporal tests will be run.
44+
* This option provides glob patterns that specify a subset of tests to be
45+
* run. Globs are resolved relative to `test/**∕Temporal/` subdirectories of
4646
* `test262Dir`. If a pattern doesn't match any files relative to
4747
* `test/**∕Temporal/`, it will also try to match relative to the current
4848
* working directory, so that tab completion works. Example:
@@ -64,9 +64,9 @@ import yaml from 'js-yaml';
6464
* the global namespace, as well as Temporal-related changes polyfilled into
6565
* `Intl` and `Date` built-in objects.
6666
* - `test262Dir: string` - Root directory of the test262 submodule repo
67-
* - `testGlobs?: string[]` - If omitted, all tests will be run. This option
68-
* provides glob patterns that specify a subset of tests to be run. Globs
69-
* are resolved relative to `test/**∕Temporal/` subdirectories of
67+
* - `testGlobs?: string[]` - If omitted, all Temporal tests will be run. This
68+
* option provides glob patterns that specify a subset of tests to be run.
69+
* Globs are resolved relative to `test/**∕Temporal/` subdirectories of
7070
* `test262Dir`. If a pattern doesn't match any files relative to
7171
* `test/**∕Temporal/`, it will also try to match relative to the current
7272
* working directory, so that tab completion works. Example:
@@ -166,8 +166,10 @@ export default function runTest262({ test262Dir, testGlobs, polyfillCodeFile, ex
166166
if (testGlobs.length === 0) {
167167
[
168168
path.resolve(testSubdirectory, '**/Temporal/**/*.js'),
169+
// e.g. intl402/DateTimeFormat/prototype/format/temporal-objects-resolved-time-zone.js
170+
path.resolve(testSubdirectory, 'intl402/**/*[tT]emporal*.js'),
169171
// "p*" is a workaround because there is no toTemporalInstant dir at this time
170-
path.resolve(testSubdirectory, 'built-ins/Date/p*/toTemporalInstant/*.js')
172+
path.resolve(testSubdirectory, 'built-ins/Date/p*/toTemporalInstant/*.js')
171173
].forEach((defaultGlob) => globResults.push(...globSync(defaultGlob, GLOB_OPTS)));
172174
}
173175

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@js-temporal/temporal-test262-runner",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "Lightweight runner for ECMAScript Temporal's Test262 tests",
55
"main": "index.mjs",
66
"scripts": {

0 commit comments

Comments
 (0)