🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@tapjs/before-each

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/before-each - npm Package Compare versions

Comparing version

to
0.0.0-4

20

dist/cjs/index.d.ts

@@ -0,3 +1,12 @@

/**
* Plugin class providing {@link BeforeEach#beforeEach} on
* the {@link Test} class.
*
* @module
*/
import type { Test } from '@tapjs/test';
import { TestBase } from '@tapjs/core';
/**
* Implementation class returned by plugin
*/
export declare class BeforeEach {

@@ -7,9 +16,16 @@ #private;

/**
* Run the supplied function before any child tests.
* Run the supplied function before any child tests, and all of their
* children, and so on.
*
* The test about to run is passed in as an argument to the function
* The test about to run is an argument to the function. While its test
* method has not yet run, it is safe to call test methods on it, but note
* that this may potentially be confusing if for example you call `t.plan()`
* and this conflicts with the `t.plan()` called in the test method.
*/
beforeEach(fn: (t: Test) => any): void;
}
/**
* plugin method that instantiates the {@link BeforeEach} object
*/
export declare const plugin: (t: TestBase) => BeforeEach;
//# sourceMappingURL=index.d.ts.map
"use strict";
/**
* Plugin class providing {@link BeforeEach#beforeEach} on
* the {@link Test} class.
*
* @module
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.BeforeEach = void 0;
const function_loop_1 = require("function-loop");
/**
* Implementation class returned by plugin
*/
class BeforeEach {

@@ -30,5 +39,9 @@ static #refs = new Map();

/**
* Run the supplied function before any child tests.
* Run the supplied function before any child tests, and all of their
* children, and so on.
*
* The test about to run is passed in as an argument to the function
* The test about to run is an argument to the function. While its test
* method has not yet run, it is safe to call test methods on it, but note
* that this may potentially be confusing if for example you call `t.plan()`
* and this conflicts with the `t.plan()` called in the test method.
*/

@@ -47,4 +60,7 @@ beforeEach(fn) {

exports.BeforeEach = BeforeEach;
/**
* plugin method that instantiates the {@link BeforeEach} object
*/
const plugin = (t) => new BeforeEach(t);
exports.plugin = plugin;
//# sourceMappingURL=index.js.map

@@ -0,3 +1,12 @@

/**
* Plugin class providing {@link BeforeEach#beforeEach} on
* the {@link Test} class.
*
* @module
*/
import type { Test } from '@tapjs/test';
import { TestBase } from '@tapjs/core';
/**
* Implementation class returned by plugin
*/
export declare class BeforeEach {

@@ -7,9 +16,16 @@ #private;

/**
* Run the supplied function before any child tests.
* Run the supplied function before any child tests, and all of their
* children, and so on.
*
* The test about to run is passed in as an argument to the function
* The test about to run is an argument to the function. While its test
* method has not yet run, it is safe to call test methods on it, but note
* that this may potentially be confusing if for example you call `t.plan()`
* and this conflicts with the `t.plan()` called in the test method.
*/
beforeEach(fn: (t: Test) => any): void;
}
/**
* plugin method that instantiates the {@link BeforeEach} object
*/
export declare const plugin: (t: TestBase) => BeforeEach;
//# sourceMappingURL=index.d.ts.map

@@ -0,2 +1,11 @@

/**
* Plugin class providing {@link BeforeEach#beforeEach} on
* the {@link Test} class.
*
* @module
*/
import { loop } from 'function-loop';
/**
* Implementation class returned by plugin
*/
export class BeforeEach {

@@ -27,5 +36,9 @@ static #refs = new Map();

/**
* Run the supplied function before any child tests.
* Run the supplied function before any child tests, and all of their
* children, and so on.
*
* The test about to run is passed in as an argument to the function
* The test about to run is an argument to the function. While its test
* method has not yet run, it is safe to call test methods on it, but note
* that this may potentially be confusing if for example you call `t.plan()`
* and this conflicts with the `t.plan()` called in the test method.
*/

@@ -43,3 +56,6 @@ beforeEach(fn) {

}
/**
* plugin method that instantiates the {@link BeforeEach} object
*/
export const plugin = (t) => new BeforeEach(t);
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "@tapjs/before-each",
"version": "0.0.0-3",
"version": "0.0.0-4",
"description": "a built-in tap extension for t.beforeEach()",

@@ -47,3 +47,3 @@ "main": "./dist/cjs/index.js",

"peerDependencies": {
"@tapjs/core": "0.0.0-3"
"@tapjs/core": "0.0.0-4"
},

@@ -50,0 +50,0 @@ "dependencies": {

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