sfm-js/test-d/index.ts
2021-06-26 23:48:46 +09:00

14 lines
331 B
TypeScript

/**
* Unit testing TypeScript types.
* with https://github.com/SamVerschueren/tsd
*/
import { expectType } from 'tsd';
import { NodeType, MfmUrl } from '../src';
describe('#NodeType', () => {
it('returns node that has sprcified type', () => {
const x = null as unknown as NodeType<'url'>;
expectType<MfmUrl>(x);
});
});