We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed9246f commit 55f800bCopy full SHA for 55f800b
lib/internal/test_runner/test.js
@@ -146,6 +146,22 @@ class TestContext {
146
}
147
148
149
+class SuiteContext {
150
+ #suite;
151
+
152
+ constructor(suite) {
153
+ this.#suite = suite;
154
+ }
155
156
+ get signal() {
157
+ return this.#suite.signal;
158
159
160
+ get name() {
161
+ return this.#suite.name;
162
163
+}
164
165
class Test extends AsyncResource {
166
#abortController;
167
#outerSignal;
@@ -737,7 +753,8 @@ class Suite extends Test {
737
753
738
754
739
755
getRunArgs() {
740
- return { ctx: { signal: this.signal, name: this.name }, args: [] };
756
+ const ctx = new SuiteContext(this);
757
+ return { ctx, args: [ctx] };
741
758
742
759
743
760
async run() {
0 commit comments