-
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.
* replace deref lib * changeset * remove v14 support
- Loading branch information
Showing
14 changed files
with
575 additions
and
386 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,6 @@ | ||
--- | ||
'oas3-chow-chow': major | ||
--- | ||
|
||
The API has been updated to be an async function. | ||
Remove support for node v14. |
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
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 |
---|---|---|
@@ -1,27 +1,25 @@ | ||
import ChowChow from '../src'; | ||
|
||
describe('Option Body', () => { | ||
it('throw with unknown format', () => { | ||
it('throw with unknown format', async () => { | ||
const fixture = require('./fixtures/option-unknown-fmt.json'); | ||
|
||
expect(() => { | ||
new ChowChow(fixture); | ||
}).toThrow( | ||
'unknown format "pet-name" ignored in schema at path "#/properties/name"' | ||
await expect(ChowChow.create(fixture)).rejects.toMatchInlineSnapshot( | ||
`[Error: unknown format "pet-name" ignored in schema at path "#/properties/name"]` | ||
); | ||
}); | ||
|
||
it('success with unknown format if unknown format is allowed', () => { | ||
it('success with unknown format if unknown format is allowed', async () => { | ||
const fixture = require('./fixtures/option-unknown-fmt.json'); | ||
|
||
expect(() => { | ||
new ChowChow(fixture, { | ||
await expect( | ||
ChowChow.create(fixture, { | ||
responseBodyAjvOptions: { | ||
formats: { | ||
'pet-name': true, | ||
}, | ||
}, | ||
}); | ||
}).not.toThrow(); | ||
}) | ||
).resolves.toBeTruthy(); | ||
}); | ||
}); |
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
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.