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.
tailchat/client/shared/utils/__tests__/is-promise.spec.ts

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);
});
});