Skip to content

Commit

Permalink
allow setting fields on t.context in t.before()
Browse files Browse the repository at this point in the history
Fix: #998
  • Loading branch information
isaacs committed Mar 8, 2024
1 parent 5fa1e90 commit b4fb630
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 31 deletions.
9 changes: 2 additions & 7 deletions src/core/dist/commonjs/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,8 @@ export declare class Base<Events extends TapBaseEvents = TapBaseEvents> extends
* Numeric identifier for this test
*/
childId: number;
/**
* Any arbitrary data that is provided to this test object. Often, this
* is set in a `t.before()` or `t.beforeEach()` method. Scalar values
* are inherited by child tests. Object values are extended in child
* tests using `Object.create()`.
*/
context: any;
get context(): any;
set context(c: any);
/**
* the TAP stream data for buffered tests
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/dist/commonjs/base.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions src/core/dist/commonjs/base.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/core/dist/commonjs/base.js.map

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions src/core/dist/esm/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,8 @@ export declare class Base<Events extends TapBaseEvents = TapBaseEvents> extends
* Numeric identifier for this test
*/
childId: number;
/**
* Any arbitrary data that is provided to this test object. Often, this
* is set in a `t.before()` or `t.beforeEach()` method. Scalar values
* are inherited by child tests. Object values are extended in child
* tests using `Object.create()`.
*/
context: any;
get context(): any;
set context(c: any);
/**
* the TAP stream data for buffered tests
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/dist/esm/base.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b4fb630

Please sign in to comment.