soda-test
Version:
Package for Unit and API tests
81 lines • 2.68 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestBed = void 0;
const testLib = require("./test-lib");
const testBed = require("./test-lib/testbed");
const executables_1 = require("./test-lib/executables");
var testbed_1 = require("./test-lib/testbed");
Object.defineProperty(exports, "TestBed", { enumerable: true, get: function () { return testbed_1.TestBed; } });
const testCase_1 = require("./test-lib/testCase");
let jest_;
try {
jest_ = jest;
}
catch (_a) {
jest_ = undefined;
}
function mergeInfo(target, source) {
for (const key in source) {
target[key] = source[key];
}
}
if (jest_) {
(0, executables_1.setJest)();
mergeInfo(exports, {
describe: testLib.describe,
context: testLib.context,
it: testLib.it,
comment: testLib.comment,
pending: testLib.pending,
expect: testLib.expect,
spy: testLib.spy,
stub: testLib.stub,
fixture: testBed.fixture,
component: testBed.component,
addEvents: testBed.addEvents,
before: testLib.before,
after: testLib.after,
beforeEach: testLib.beforeEach,
afterEach: testLib.afterEach,
global: testLib.global,
importPrivate: testLib.importPrivate,
rewire: testLib.rewire,
useFakeTimers: testLib.useFakeTimers,
sandbox: testLib.sandbox,
testStep: testCase_1.testStep,
testCase: testCase_1.testCase,
environment: testLib.environment
});
}
else {
mergeInfo(exports, {
context: testLib.context,
it: testLib.it,
comment: testLib.comment,
pending: testLib.pending,
before: testLib.before,
after: testLib.after,
beforeEach: testLib.beforeEach,
afterEach: testLib.afterEach,
describe: testLib.describe,
spy: testLib.spy,
stub: testLib.stub,
fixture: testBed.fixture,
component: testBed.component,
addEvents: testBed.addEvents,
global: testLib.global,
importPrivate: testLib.importPrivate,
useFakeTimers: testLib.useFakeTimers,
createStub: testLib.createStub,
createAggregation: testLib.createAggregation,
createAgrigation: testLib.createAggregation,
rewire: testLib.rewire,
expect: testLib.expect,
request: testLib.request,
sandbox: testLib.sandbox,
testStep: testCase_1.testStep,
testCase: testCase_1.testCase,
environment: testLib.environment
});
}
//# sourceMappingURL=index.js.map