@tapjs/before
Advanced tools
Comparing version 0.0.0-2 to 0.0.0-3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.plugin = exports.Before = void 0; | ||
const is_actual_promise_1 = require("is-actual-promise"); | ||
class Before { | ||
@@ -29,3 +30,3 @@ #t; | ||
// TestBase will already wait on functions that return promises. | ||
if (isPromise(ret) && !deferred) { | ||
if ((0, is_actual_promise_1.isPromise)(ret) && !deferred) { | ||
this.#t.waitOn(ret, w => { | ||
@@ -47,3 +48,2 @@ if (w.rejected) { | ||
exports.plugin = plugin; | ||
const isPromise = (p) => !!p && typeof p === 'object' && typeof p.then === 'function'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,2 @@ | ||
import { isPromise } from 'is-actual-promise'; | ||
export class Before { | ||
@@ -41,3 +42,2 @@ #t; | ||
export const plugin = (t) => new Before(t); | ||
const isPromise = (p) => !!p && typeof p === 'object' && typeof p.then === 'function'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@tapjs/before", | ||
"version": "0.0.0-2", | ||
"version": "0.0.0-3", | ||
"description": "a built-in tap extension for t.before()", | ||
@@ -47,3 +47,3 @@ "main": "./dist/cjs/index.js", | ||
"peerDependencies": { | ||
"@tapjs/core": "0.0.0-2" | ||
"@tapjs/core": "0.0.0-3" | ||
}, | ||
@@ -56,3 +56,6 @@ "engines": { | ||
"url": "git+https://github.com/tapjs/tapjs.git" | ||
}, | ||
"dependencies": { | ||
"is-actual-promise": "^1.0.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12786
2
+ Addedis-actual-promise@^1.0.0
+ Added@tapjs/core@0.0.0-3(transitive)
+ Added@tapjs/test@0.0.0-3(transitive)
+ Addedis-actual-promise@1.0.2(transitive)
- Removed@tapjs/core@0.0.0-2(transitive)
- Removed@tapjs/test@0.0.0-2(transitive)