-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Case insensitive response header (#72)
* Make response header validation cas-insensitive * Added jest config files and dependencies for debuging spec files * Added changeset * Ran prettier * Remove reflect-metadata dependency * Lowercase header name to be validated * Move jest config from package.json to jest.config * prettier formatting * Simplify tests with toThrowErrorMatchingSnapshot * Change parameter name to fix duplicate name scope warning * Simplify no error expectation. Formatting * remove jest.setup.js * Remove setupFilesAfterEnv prop * prettier * Remove package-lock.json Co-authored-by: Chris Olson <chris.olson@dat.com>
- Loading branch information
Showing
7 changed files
with
100 additions
and
26 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'oas3-chow-chow': minor | ||
--- | ||
|
||
Make response header name validation case-insensitive |
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,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Response validateResponseByOperationId should fail if header value is invalid 1`] = `"ResponseValidationError: Schema validation error"`; | ||
|
||
exports[`Response validateResponseByPath should fail if header value is invalid 1`] = `"ResponseValidationError: Schema validation error"`; |
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
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,25 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: 'tsconfig.json' | ||
} | ||
}, | ||
roots: [ | ||
"<rootDir>/src", | ||
"<rootDir>__test__" | ||
], | ||
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', | ||
moduleFileExtensions: [ | ||
'ts', | ||
'tsx', | ||
'js', | ||
'jsx', | ||
'json', | ||
'node' | ||
], | ||
testEnvironment: 'node', | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest" | ||
} | ||
}; |
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