axios-miniprogram/test/cancel/Cancel.test.ts

22 lines
467 B
TypeScript
Raw Normal View History

2020-04-20 22:33:15 +08:00
/*
* @Author: early-autumn
* @Date: 2020-04-20 15:09:33
* @LastEditors: early-autumn
* @LastEditTime: 2020-04-20 15:17:27
*/
import Cancel from '../../src/cancel/Cancel';
describe('测试 src/cancel/Cancel.ts', () => {
it('默认', () => {
const cancel = new Cancel();
expect(cancel.toString()).toBe('Cancel');
});
it('自定义', () => {
const cancel = new Cancel('custom');
expect(cancel.toString()).toBe('Cancel: custom');
});
});