mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Adding Cancel and CancelToken classes
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
var Cancel = require('../../../lib/cancel/Cancel');
|
||||
|
||||
describe('Cancel', function() {
|
||||
describe('toString', function() {
|
||||
it('returns correct result when message is not specified', function() {
|
||||
var cancel = new Cancel();
|
||||
expect(cancel.toString()).toBe('Cancel');
|
||||
});
|
||||
|
||||
it('returns correct result when message is specified', function() {
|
||||
var cancel = new Cancel('Operation has been canceled.');
|
||||
expect(cancel.toString()).toBe('Cancel: Operation has been canceled.');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user