Socket
Socket
Sign inDemoInstall

prescript

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prescript - npm Package Compare versions

Comparing version 0.55555555.0-55555 to 0.55555555.0-555555

lib/PendingError.d.ts

21

api/prescript.d.ts

@@ -56,2 +56,3 @@ /**

getCurrentPrescriptionState: typeof getCurrentPrescriptionState;
isPendingError: typeof isPendingError;
};

@@ -128,2 +129,11 @@ export default _default;

/**
* Checks if the provided Error object is a PendingError, which is
* thrown by the `pending()` step.
*
* @param e - The error to check.
* @public
*/
export declare function isPendingError(e: any): boolean;
/**
* @alpha

@@ -172,2 +182,6 @@ */

* Called when the test is finished.
* @param errors - Errors that occurred during the test.
* If there are no errors, this will be an empty array.
* Note that pending tests are treated the same way as errors.
* To check if an error object represents a pending test, use the {@link isPendingError} function.
*/

@@ -177,8 +191,11 @@ onFinish(errors: Error[]): void;

* Called when the test step is being entered.
* @param step - The test step that is being entered.
*/
onEnterStep(node: IStep): void;
onEnterStep(step: IStep): void;
/**
* Called when the test step is being exited.
* @param step - The test step that is being exited.
* @param error - The error that occurred during the test step.
*/
onExitStep(node: IStep, error?: Error): void;
onExitStep(step: IStep, error?: Error): void;
}

@@ -185,0 +202,0 @@

5

lib/loadTestModule.js

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

const prettyFormatStep_1 = __importDefault(require("./prettyFormatStep"));
const PendingError_1 = require("./PendingError");
function loadTest(testModule, options = {}) {

@@ -132,5 +133,3 @@ const { logger: inLogger = createConsoleLogger() } = options;

const DEFAULT_ACTION_STEP = async () => {
const error = new Error('[pending]');
error.__prescriptPending = true;
throw error;
throw new PendingError_1.PendingError();
};

@@ -137,0 +136,0 @@ const context = {

@@ -5,3 +5,5 @@ /**

*/
import { isPendingError } from './PendingError';
import { ActionFunction, StepDefName } from './types';
export { isPendingError } from './PendingError';
export { StepName } from './StepName';

@@ -113,4 +115,5 @@ export { ActionFunction, ActionWrapper, IConfig, IStep, ITestExecutionContext, ITestReporter, StepDefName, Thenable } from './types';

getCurrentPrescriptionState: typeof getCurrentPrescriptionState;
isPendingError: typeof isPendingError;
};
export default _default;
//# sourceMappingURL=singletonApi.d.ts.map

@@ -11,3 +11,6 @@ "use strict";

const currentActionContext_1 = __importDefault(require("./currentActionContext"));
const PendingError_1 = require("./PendingError");
const singleton_1 = require("./singleton");
var PendingError_2 = require("./PendingError");
exports.isPendingError = PendingError_2.isPendingError;
var StepName_1 = require("./StepName");

@@ -122,4 +125,5 @@ exports.StepName = StepName_1.StepName;

getCurrentContext,
getCurrentPrescriptionState
getCurrentPrescriptionState,
isPendingError: PendingError_1.isPendingError
};
//# sourceMappingURL=singletonApi.js.map

@@ -116,2 +116,6 @@ /// <reference types="node" />

* Called when the test is finished.
* @param errors - Errors that occurred during the test.
* If there are no errors, this will be an empty array.
* Note that pending tests are treated the same way as errors.
* To check if an error object represents a pending test, use the {@link isPendingError} function.
*/

@@ -121,8 +125,11 @@ onFinish(errors: Error[]): void;

* Called when the test step is being entered.
* @param step - The test step that is being entered.
*/
onEnterStep(node: IStep): void;
onEnterStep(step: IStep): void;
/**
* Called when the test step is being exited.
* @param step - The test step that is being exited.
* @param error - The error that occurred during the test step.
*/
onExitStep(node: IStep, error?: Error): void;
onExitStep(step: IStep, error?: Error): void;
}

@@ -129,0 +136,0 @@ export interface IVisitor {

{
"name": "prescript",
"version": "0.55555555.0-55555",
"version": "0.55555555.0-555555",
"description": "Object-oriented acceptance test tool",

@@ -5,0 +5,0 @@ "main": "./lib/singletonApi.js",

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