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

fix(test-runner): resolve global hooks relative to the config dir #7061

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

pavelfeldman
Copy link
Member

Fixes #7004

@@ -77,6 +77,12 @@ export class Loader {
private _processConfigObject(rootDir: string) {
validateConfig(this._config);

// Resolve script hooks relative to the root dir.
if (this._config.globalSetup)
this._config.globalSetup = path.resolve(rootDir, this._config.globalSetup);
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this should be resolved to the config file dir not to the root dir.

Copy link
Member Author

Choose a reason for hiding this comment

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

Root dir is the file dir (in this method :))

@pavelfeldman pavelfeldman merged commit 49a8f67 into microsoft:master Jun 11, 2021
aslushnikov pushed a commit to aslushnikov/playwright that referenced this pull request Jun 11, 2021
aslushnikov added a commit that referenced this pull request Jun 11, 2021
…g dir (#7074)

Cherry-Pick #7061 SHA 49a8f67

Fixes #7004

Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[test runner] Error: Error while reading global-setup.ts: Cannot find module 'global-setup.ts'
3 participants