Skip to content

Commit

Permalink
test(unit): update webserver test
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mdy-m committed Sep 14, 2024
1 parent 5195adf commit f079497
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/core/__test__/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,8 @@ describe('WebServer', () => {

it('should not register duplicate handlers', () => {
const handler: Gland.RouteHandler = (ctx: Context) => {};
const routerSetSpy = sinon.spy(Router, 'set');
server.all('/test', handler);
server.all('/test', handler);
METHODS.forEach((method) => {
const setCallCount = routerSetSpy.withArgs(handler, '/test').callCount;
expect(setCallCount).to.equal(35, `Expected Router.set to be called once for ${method}`);
});
const registeredMiddlewares = server['middlewares'];
expect(registeredMiddlewares).to.have.length(METHODS.length);
});
Expand Down

0 comments on commit f079497

Please sign in to comment.