DefinitelyTyped/types/jest-cucumber-fusion/jest-cucumber-fusion-tests.ts
Pelle Johnsen 93d70f87d5
Add jest-cucumber-fusion (#43487)
* Add jest-cucumber-fusion

* Add 'declare module'

* Add support for Gherkin tables

* Fix failing tests for jest-cucumber-fusion

- Set minimum ts version

- Fix linting errors
2020-04-01 12:45:48 -07:00

33 lines
1.1 KiB
TypeScript

import * as jcf from 'jest-cucumber-fusion';
type CbArgs = ReadonlyArray<string | Array<Record<string, string>>>;
function cb(...args: CbArgs): void {}
async function cbAsync(...args: CbArgs): Promise<void> {}
jcf.Given('', cb); // $ExpectType void
jcf.Given('', cbAsync); // $ExpectType void
jcf.When('', cb); // $ExpectType void
jcf.When('', cbAsync); // $ExpectType void
jcf.Then('', cb); // $ExpectType void
jcf.Then('', cbAsync); // $ExpectType void
jcf.And('', cb); // $ExpectType void
jcf.And('', cbAsync); // $ExpectType void
jcf.But('', cb); // $ExpectType void
jcf.But('', cbAsync); // $ExpectType void
jcf.After(() => {}); // $ExpectType void
jcf.After(async () => {}); // $ExpectType void
jcf.Before(() => {}); // $ExpectType void
jcf.Before(async () => {}); // $ExpectType void
jcf.Fusion(''); // $ExpectType void
jcf.Fusion('', { errors: true }); // $ExpectType void
jcf.Fusion('', { loadRelativePath: true }); // $ExpectType void
jcf.Fusion('', { scenarioNameTemplate: vars => vars.featureTitle }); // $ExpectType void
jcf.Fusion('', { tagFilter: '' }); // $ExpectType void