Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS migration] Migrate 'config.js' test to TypeScript #37432

Merged
merged 5 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/libs/E2E/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import type {TEST_NAMES} from 'tests/e2e/config';
import type {ValueOf} from 'type-fest';

type SigninParams = {
email?: string;
};
Expand All @@ -19,7 +22,7 @@ type NetworkCacheMap = Record<
>;

type TestConfig = {
name: string;
name: ValueOf<typeof TEST_NAMES>;
[key: string]: string | {autoFocus: boolean};
};

Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/config.js → tests/e2e/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- if the first value is '' nullish coalescing will return '' so leaving || for safty
const OUTPUT_DIR = process.env.WORKING_DIRECTORY || './tests/e2e/results';

// add your test name here …
Expand Down Expand Up @@ -88,3 +89,5 @@ export default {
},
},
};

export {TEST_NAMES};
Loading