-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: composer not being recognized as valid middleware for default ha…
…ndler (#59) * fix: composer not being recognized as middleware * fix: utils tests filename * add: test for Composer[]
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { isMiddleware } from "../src/utils/checks.ts"; | ||
import { CommandsFlavor } from "../src/context.ts"; | ||
import { CommandGroup, commandNotFound } from "../src/mod.ts"; | ||
import { dummyCtx } from "./context.test.ts"; | ||
import { | ||
assert, | ||
assertEquals, | ||
assertFalse, | ||
Context, | ||
describe, | ||
it, | ||
} from "./deps.test.ts"; | ||
import { Composer } from "../src/deps.deno.ts"; | ||
|
||
describe("Utils tests", () => { | ||
describe("isMiddleware", () => { | ||
it("Composer", () => { | ||
const composer = new Composer(); | ||
assert(isMiddleware(composer)); | ||
}); | ||
it("Composer[]", () => { | ||
const a = new Composer(); | ||
const b = new Composer(); | ||
assert(isMiddleware([a, b])); | ||
}); | ||
}); | ||
}); |