How to use the @tsed/testing.TestContext.reset function in @tsed/testing

To help you get started, we’ve selected a few @tsed/testing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / test / units / testing / TestContext.spec.ts View on Github external
it("should reset the injector", () => {
      const injectionKey = "key";
      TestContext.injector.set(injectionKey, new Provider("something"));
      TestContext.reset();
      expect((TestContext as any)._injector).eq(null);
    });
  });
github TypedProject / ts-express-decorators / packages / testing-mongoose / src / TestMongooseContext.ts View on Github external
static async reset() {
    await TestContext.reset();
    await TestMongooseContext.mongod.stop();
    delete TestMongooseContext.mongod;
  }

@tsed/testing

A TypeScript Framework on top of Express

MIT
Latest version published 4 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages