Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("should reset the injector", () => {
const injectionKey = "key";
TestContext.injector.set(injectionKey, new Provider("something"));
TestContext.reset();
expect((TestContext as any)._injector).eq(null);
});
});
static async reset() {
await TestContext.reset();
await TestMongooseContext.mongod.stop();
delete TestMongooseContext.mongod;
}
before(() => TestContext.reset());
after(() => TestContext.reset());
after(() => TestContext.reset());
before(() => TestContext.reset());
after(() => TestContext.reset());
after(() => TestContext.reset());
before(() => TestContext.reset());
after(() => TestContext.reset());