Skip to content

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

Merged
pavelfeldman merged 1 commit into
microsoft:masterfrom
pavelfeldman:relative
Jun 11, 2021
Merged

fix(test-runner): resolve global hooks relative to the config dir#7061
pavelfeldman merged 1 commit into
microsoft:masterfrom
pavelfeldman:relative

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

Fixes #7004

Comment thread src/test/loader.ts

// Resolve script hooks relative to the root dir.
if (this._config.globalSetup)
this._config.globalSetup = path.resolve(rootDir, this._config.globalSetup);
Copy link
Copy Markdown
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
Copy Markdown
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