shallow-render
Version:
Shallow rendering test utility for Angular
16 lines • 596 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockWithStubs = void 0;
const test_framework_1 = require("../test-frameworks/test-framework");
class MockWithStubs {
constructor(stubs = {}) {
Object.assign(this, stubs);
Object.keys(stubs).forEach(key => {
if (typeof this[key] === 'function' && !test_framework_1.testFramework.isSpy(this[key])) {
test_framework_1.testFramework.spyOn(this, key);
}
});
}
}
exports.MockWithStubs = MockWithStubs;
//# sourceMappingURL=mock-with-stubs.js.map