Socket
Socket
Sign inDemoInstall

@tapjs/core

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/core - npm Package Compare versions

Comparing version 1.4.6 to 1.5.0

8

dist/commonjs/base.d.ts

@@ -132,2 +132,10 @@ /**

* tests using `Object.create()`.
*
* If not set in the options, this is initialized to a null-prototyped
* object, so that usage like `t.context.foo = 'bar'` will work as expected.
*
* This is initialized and set on the Test object in the `runMain` method,
* *not* at construction time. If set explicitly on the Test object in a
* `before` hook, then any context specified on options or inherited from
* the parent test will be ignored.
*/

@@ -134,0 +142,0 @@ context?: any;

16

dist/commonjs/base.js

@@ -236,11 +236,2 @@ "use strict";

this.silent = !!options.silent;
// if it's null or an object, inherit from it. otherwise, copy it.
const ctx = options.context;
if (ctx !== undefined) {
this.context =
typeof ctx === 'object' ? Object.create(ctx) : ctx;
}
else {
this.context = null;
}
this.bail = !!options.bail;

@@ -404,2 +395,9 @@ this.strict = !!options.strict;

this.#started = true;
// if it's null or an object, inherit from it. otherwise, copy it.
const ctx = this.context ??
('context' in this.options
? this.options.context
: this.parent?.context) ??
null;
this.context = typeof ctx === 'object' ? Object.create(ctx) : ctx;
this.hook.runInAsyncScope(this.main, this, cb);

@@ -406,0 +404,0 @@ }

@@ -357,2 +357,3 @@ "use strict";

'failSkip',
'diagnostic',
];

@@ -1104,3 +1105,2 @@ for (const k of inheritedFlags) {

}
extra.context = this.context;
this.#inheritFlags(extra);

@@ -1107,0 +1107,0 @@ const t = new Class(extra);

@@ -132,2 +132,10 @@ /**

* tests using `Object.create()`.
*
* If not set in the options, this is initialized to a null-prototyped
* object, so that usage like `t.context.foo = 'bar'` will work as expected.
*
* This is initialized and set on the Test object in the `runMain` method,
* *not* at construction time. If set explicitly on the Test object in a
* `before` hook, then any context specified on options or inherited from
* the parent test will be ignored.
*/

@@ -134,0 +142,0 @@ context?: any;

@@ -232,11 +232,2 @@ /**

this.silent = !!options.silent;
// if it's null or an object, inherit from it. otherwise, copy it.
const ctx = options.context;
if (ctx !== undefined) {
this.context =
typeof ctx === 'object' ? Object.create(ctx) : ctx;
}
else {
this.context = null;
}
this.bail = !!options.bail;

@@ -400,2 +391,9 @@ this.strict = !!options.strict;

this.#started = true;
// if it's null or an object, inherit from it. otherwise, copy it.
const ctx = this.context ??
('context' in this.options
? this.options.context
: this.parent?.context) ??
null;
this.context = typeof ctx === 'object' ? Object.create(ctx) : ctx;
this.hook.runInAsyncScope(this.main, this, cb);

@@ -402,0 +400,0 @@ }

@@ -328,2 +328,3 @@ import * as stack from '@tapjs/stack';

'failSkip',
'diagnostic',
];

@@ -1075,3 +1076,2 @@ for (const k of inheritedFlags) {

}
extra.context = this.context;
this.#inheritFlags(extra);

@@ -1078,0 +1078,0 @@ const t = new Class(extra);

{
"name": "@tapjs/core",
"version": "1.4.6",
"version": "1.5.0",
"description": "pluggable core of node-tap",

@@ -56,3 +56,3 @@ "tshy": {

"@tapjs/stack": "1.2.7",
"@tapjs/test": "1.3.17",
"@tapjs/test": "1.4.0",
"async-hook-domain": "^4.0.1",

@@ -59,0 +59,0 @@ "diff": "^5.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc