Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zheksoon committed Apr 4, 2024
1 parent a838247 commit 38ff1d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/dioma.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,15 @@ describe("Dioma", () => {
expect(instance).toBeInstanceOf(RegisterClass);
});

it("should throw when invalid descriptor is injected", () => {
const token = new Token();

// @ts-expect-error
globalContainer.register({ token, something: "invalid" });

expect(() => inject(token)).toThrowError();
});

it("should use registration scope if provided", () => {
class RegisterClass {
constructor() {}
Expand Down

0 comments on commit 38ff1d9

Please sign in to comment.