Skip to content

Commit

Permalink
chore: fix lint issues (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored May 5, 2020
1 parent 734a93f commit 8f8e2f8
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,28 +301,22 @@ describe('retry-axios', () => {

it('should ignore requests that have been canceled', async () => {
const scopes = [
nock(url)
.get('/')
.times(2)
.delay(5)
.reply(500),
nock(url)
.get('/')
.reply(200, 'toast'),
nock(url).get('/').times(2).delay(5).reply(500),
nock(url).get('/').reply(200, 'toast'),
];
interceptorId = rax.attach();
try {
const src = axios.CancelToken.source();
const cfg: rax.RaxConfig = {
url,
raxConfig: { retry: 2 },
raxConfig: {retry: 2},
cancelToken: src.token,
};
const req = axios(cfg);
setTimeout(() => {
src.cancel();
}, 10);
const res = await req;
await req;
throw new Error('The canceled request completed.');
} catch (err) {
assert.strictEqual(axios.isCancel(err), true);
Expand Down

0 comments on commit 8f8e2f8

Please sign in to comment.