Skip to content

Commit

Permalink
chore: assert type of route info objects
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Apr 5, 2023
1 parent 718e704 commit 06da94b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration/hello-world/e2e/middleware-fastify.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class TestModule {
.apply((req, res, next) => res.end(SCOPED_VALUE))
.forRoutes(TestController)
.apply((req, res, next) => res.end(RETURN_VALUE))
.exclude({ path: QUERY_VALUE, method: -1 })
.exclude({ path: QUERY_VALUE, method: -1 as any })
.forRoutes('(.*)');
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/helpers/router-method-factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ describe('RouterMethodFactory', () => {
expect(factory.get(target, RequestMethod.PATCH)).to.equal(target.patch);
expect(factory.get(target, RequestMethod.OPTIONS)).to.equal(target.options);
expect(factory.get(target, RequestMethod.HEAD)).to.equal(target.head);
expect(factory.get(target, -1)).to.equal(target.use);
expect(factory.get(target, -1 as any)).to.equal(target.use);
});
});
2 changes: 1 addition & 1 deletion packages/core/test/middleware/builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('MiddlewareBuilder', () => {
expect(proxy.getExcludedRoutes()).to.be.eql([
{
path,
method: -1,
method: -1 as any,
},
]);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/pipes/params-token-factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('ParamsTokenFactory', () => {
});
describe('not available', () => {
it('should return "custom"', () => {
expect(factory.exchangeEnumForString(-1)).to.be.eql('custom');
expect(factory.exchangeEnumForString(-1 as any)).to.be.eql('custom');
});
});
});
Expand Down

0 comments on commit 06da94b

Please sign in to comment.