mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Adding axios.isCancel method
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
var isCancel = require('../../../lib/cancel/isCancel');
|
||||
var Cancel = require('../../../lib/cancel/Cancel');
|
||||
|
||||
describe('isCancel', function() {
|
||||
it('returns true if value is a Cancel', function() {
|
||||
expect(isCancel(new Cancel())).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false if value is not a Cancel', function() {
|
||||
expect(isCancel({ foo: 'bar' })).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user