@scalar/types
Version:
Types to work with Scalar packages
32 lines (31 loc) • 1.01 kB
JavaScript
import { assertType, describe, it } from 'vitest';
describe('TargetId', () => {
it('has node as a target', () => {
const target = 'node';
assertType(target);
});
it(`target doesn't exist`, () => {
const target = 'foo';
// @ts-expect-error target doesn't exist
assertType(target);
});
it('has undici as a client', () => {
const client = 'undici';
assertType(client);
});
it(`client doesn't exist`, () => {
const client = 'does-not-exist';
// @ts-expect-error client doesn't exist
assertType(client);
});
it(`client exists, but target doesn't`, () => {
const client = 'undici';
// @ts-expect-error client exists, but target doesn't
assertType(client);
});
it('client does exist, but not for the given target', () => {
const client = 'undici';
// @ts-expect-error client does exist, but not for the given target
assertType(client);
});
});