UNPKG

@plugjs/expect5

Version:

Unit Testing for the PlugJS Build System ========================================

128 lines (126 loc) 4.62 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // execution/setup.ts var setup_exports = {}; __export(setup_exports, { after: () => after, afterAll: () => afterAll, afterEach: () => afterEach, before: () => before, beforeAll: () => beforeAll, beforeEach: () => beforeEach, describe: () => describe, fdescribe: () => fdescribe, fit: () => fit, it: () => it, xafterAll: () => xafterAll, xafterEach: () => xafterEach, xbeforeAll: () => xbeforeAll, xbeforeEach: () => xbeforeEach, xdescribe: () => xdescribe, xit: () => xit }); module.exports = __toCommonJS(setup_exports); var import_executable = require("./executable.cjs"); var describe = (name, call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addSuite(new import_executable.Suite(parent, name, call, timeout)); }; var fdescribe = (name, call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addSuite(new import_executable.Suite(parent, name, call, timeout, "only")); }; var xdescribe = (name, call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addSuite(new import_executable.Suite(parent, name, call, timeout, "skip")); }; describe.skip = xdescribe; describe.only = fdescribe; var it = (name, call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addSpec(new import_executable.Spec(parent, name, call, timeout)); }; var fit = (name, call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addSpec(new import_executable.Spec(parent, name, call, timeout, "only")); }; var xit = (name, call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addSpec(new import_executable.Spec(parent, name, call, timeout, "skip")); }; it.skip = xit; it.only = fit; var beforeAll = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addBeforeAllHook(new import_executable.Hook(parent, "beforeAll", call, timeout)); }; var xbeforeAll = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addBeforeAllHook(new import_executable.Hook(parent, "beforeAll", call, timeout, "skip")); }; var beforeEach = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addBeforeEachHook(new import_executable.Hook(parent, "beforeEach", call, timeout)); }; var xbeforeEach = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addBeforeEachHook(new import_executable.Hook(parent, "beforeEach", call, timeout, "skip")); }; var afterAll = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addAfterAllHook(new import_executable.Hook(parent, "afterAll", call, timeout)); }; var xafterAll = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addAfterAllHook(new import_executable.Hook(parent, "afterAll", call, timeout, "skip")); }; var afterEach = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addAfterEachHook(new import_executable.Hook(parent, "afterEach", call, timeout)); }; var xafterEach = (call, timeout) => { const parent = (0, import_executable.getCurrentSuite)(); parent.addAfterEachHook(new import_executable.Hook(parent, "afterEach", call, timeout, "skip")); }; beforeAll.skip = xbeforeAll; beforeEach.skip = xbeforeEach; afterAll.skip = xafterAll; afterEach.skip = xafterEach; var before = beforeAll; var after = afterAll; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { after, afterAll, afterEach, before, beforeAll, beforeEach, describe, fdescribe, fit, it, xafterAll, xafterEach, xbeforeAll, xbeforeEach, xdescribe, xit }); //# sourceMappingURL=setup.cjs.map