You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,42 @@ Runtime initialization took 55ms
43
43
44
44
If all tests pass, everything is good! At this point you can make changes to the runtime, add breakpoints and step through with the debugger. In the next section we'll see how to attach the runtime to an existing NativeScript application allowing us to debug runtime issues in actual apps.
45
45
46
+
## Test262 integration
47
+
48
+
The `TestRunner` target can host a filtered subset of [Test262](https://github.com/tc39/test262) inside the same Jasmine and JUnit pipeline that the existing runtime tests already use.
49
+
50
+
The integration in this repo is intentionally phased:
51
+
52
+
1. Test262 cases are discovered ahead of time and written to `TestRunner/app/tests/Test262/generated-manifest.json`.
53
+
2. Each discovered case is executed in its own `Worker`, so it gets an isolated realm instead of sharing Jasmine's main global object.
54
+
3. The generated specs are reported through the existing `TestRunner` JUnit output, so they show up in the current Xcode and CI flow.
55
+
56
+
To wire in the upstream suite, add it as a submodule under the bundled test tree:
Then enable and tune `TestRunner/app/tests/Test262/config.js`. The TestRunner build now regenerates the manifest automatically by running:
64
+
65
+
```bash
66
+
node ./scripts/generate-test262-manifest.js
67
+
```
68
+
69
+
By default, enabling the suite does not try to run the whole upstream corpus. It starts from the curated prefixes in `TestRunner/app/tests/Test262/curated-prefixes.json` and caps generation at 250 entries unless you override it.
70
+
71
+
Useful environment variables for local runs and CI sharding:
72
+
73
+
```bash
74
+
TEST262_FILTER=built-ins/Array
75
+
TEST262_LIMIT=250
76
+
TEST262_SHARD_COUNT=4
77
+
TEST262_SHARD_INDEX=0
78
+
```
79
+
80
+
The current adapter is deliberately conservative. It skips unsupported `module` and `raw` cases by default and is disabled by default so existing CI remains unchanged until you choose a supported subset.
81
+
46
82
# Attaching the runtime to a NativeScript app
47
83
48
84
In the existing app, we need to prepare the Xcode project using `ns prepare ios`. This will create a folder named `platforms/ios` and in there a `<appname>.xcworkspace` (or .xcodeproject but note the following...).
0 commit comments