Skip to content

Commit

Permalink
chore: fix types in "custom-request-handler" test (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito authored Jul 14, 2022
1 parent 6b8466f commit 6c6e119
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/rest-api/custom-request-handler.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import {

// This is an example of a custom request handler that matches requests
// based on the presence of a given header.
class HeaderHandler extends RequestHandler<{ headerName: string }> {
class HeaderHandler extends RequestHandler<{
header: string
headerName: string
}> {
constructor(headerName: string, resolver: ResponseResolver) {
super({
info: {
Expand All @@ -36,7 +39,7 @@ interface CustomContext {
halJson: (body: Record<string, any>) => ResponseTransformer
}

class UrlHandler extends RequestHandler<{ url: string }> {
class UrlHandler extends RequestHandler<{ header: string; url: string }> {
constructor(
url: string,
resolver: ResponseResolver<MockedRequest, CustomContext>,
Expand Down

0 comments on commit 6c6e119

Please sign in to comment.