Skip to content

Commit b4fb630

Browse files
committed
allow setting fields on t.context in t.before()
Fix: #998
1 parent 5fa1e90 commit b4fb630

File tree

11 files changed

+57
-31
lines changed

11 files changed

+57
-31
lines changed

src/core/dist/commonjs/base.d.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,8 @@ export declare class Base<Events extends TapBaseEvents = TapBaseEvents> extends
295295
* Numeric identifier for this test
296296
*/
297297
childId: number;
298-
/**
299-
* Any arbitrary data that is provided to this test object. Often, this
300-
* is set in a `t.before()` or `t.beforeEach()` method. Scalar values
301-
* are inherited by child tests. Object values are extended in child
302-
* tests using `Object.create()`.
303-
*/
304-
context: any;
298+
get context(): any;
299+
set context(c: any);
305300
/**
306301
* the TAP stream data for buffered tests
307302
*

src/core/dist/commonjs/base.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/dist/commonjs/base.js

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

src/core/dist/commonjs/base.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/dist/esm/base.d.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,8 @@ export declare class Base<Events extends TapBaseEvents = TapBaseEvents> extends
295295
* Numeric identifier for this test
296296
*/
297297
childId: number;
298-
/**
299-
* Any arbitrary data that is provided to this test object. Often, this
300-
* is set in a `t.before()` or `t.beforeEach()` method. Scalar values
301-
* are inherited by child tests. Object values are extended in child
302-
* tests using `Object.create()`.
303-
*/
304-
context: any;
298+
get context(): any;
299+
set context(c: any);
305300
/**
306301
* the TAP stream data for buffered tests
307302
*

src/core/dist/esm/base.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)