mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
353 B
TypeScript
17 lines
353 B
TypeScript
import { isPromise } from '../is-promise';
|
|
|
|
describe('isPromise', () => {
|
|
test.each([
|
|
[Promise.resolve(), true],
|
|
['str', false],
|
|
[123, false],
|
|
[[], false],
|
|
[{}, false],
|
|
[Symbol('sym'), false],
|
|
[undefined, false],
|
|
[null, false],
|
|
])('%s => %s', (input, should) => {
|
|
expect(isPromise(input)).toBe(should);
|
|
});
|
|
});
|