How to use the @tsed/testing.TestContext.injector 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 attach injector instance to TestContext", () => {
      expect(TestContext.injector).to.be.instanceof(InjectorService);
    });
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 / test / units / testing / bootstrap.spec.ts View on Github external
it("should attach injector instance to TestContext", () => {
    expect(TestContext.injector).to.eq("Injector");
  });

@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