Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kokororin committed Nov 11, 2018
1 parent 18bd760 commit bdb1322
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/honokaTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ describe('honoka', () => {
).to.be.fulfilled;
});

it('AbortController should work', () => {
// eslint-disable-next-line
const abortController = new AbortController();
const signal = abortController.signal;

expect(
honoka(`${EXPRESS_BASE_URL}/with/timeout`, {
signal
})
).to.be.rejected;

abortController.abort();
});

it('honoka.interceptors.register() should register a request interceptor', async () => {
honoka.interceptors.register({
request: options => {
Expand Down

0 comments on commit bdb1322

Please sign in to comment.