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

feat: Support --esm flag #235

Merged
merged 2 commits into from
Jul 16, 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
7 changes: 5 additions & 2 deletions src/testcafe-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ export function buildCommandLine(
cli.push('--compiler-options', options);
}
}
if (suite.esm) {
cli.push('--esm');
}

// Screenshots
if (suite.screenshots) {
Expand Down Expand Up @@ -286,8 +289,8 @@ async function runTestCafe(
'..',
'node_modules',
'testcafe',
'lib',
'cli',
'bin',
'testcafe-with-v8-flag-filter.js',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only testcafe-with-v8-flag-filter.js can support --esm. See https://github.com/DevExpress/testcafe/blob/master/bin/testcafe-with-v8-flag-filter.js#L9

);

const testcafeProc = spawn(
Expand Down
1 change: 1 addition & 0 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
configPath?: string;
customCompilerModulePath?: string;
options?: {
[key: string]: any;

Check warning on line 29 in src/type.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
};
};

Expand Down Expand Up @@ -90,6 +90,7 @@
filter?: Filter;
preExec?: string[];
timeout?: number;
esm?: boolean;
};

export type TestCafeConfig = {
Expand Down
Loading