Erster Docker-Stand
This commit is contained in:
9
_node_modules/fast-check/lib/check/precondition/Pre.js
generated
Normal file
9
_node_modules/fast-check/lib/check/precondition/Pre.js
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.pre = pre;
|
||||
const PreconditionFailure_1 = require("./PreconditionFailure");
|
||||
function pre(expectTruthy) {
|
||||
if (!expectTruthy) {
|
||||
throw new PreconditionFailure_1.PreconditionFailure();
|
||||
}
|
||||
}
|
||||
15
_node_modules/fast-check/lib/check/precondition/PreconditionFailure.js
generated
Normal file
15
_node_modules/fast-check/lib/check/precondition/PreconditionFailure.js
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PreconditionFailure = void 0;
|
||||
class PreconditionFailure extends Error {
|
||||
constructor(interruptExecution = false) {
|
||||
super();
|
||||
this.interruptExecution = interruptExecution;
|
||||
this.footprint = PreconditionFailure.SharedFootPrint;
|
||||
}
|
||||
static isFailure(err) {
|
||||
return err != null && err.footprint === PreconditionFailure.SharedFootPrint;
|
||||
}
|
||||
}
|
||||
exports.PreconditionFailure = PreconditionFailure;
|
||||
PreconditionFailure.SharedFootPrint = Symbol.for('fast-check/PreconditionFailure');
|
||||
Reference in New Issue
Block a user