Skip to content

Commit

Permalink
cherry-pick(#11596): fix(esm): don't emit module shorthand warning (#…
Browse files Browse the repository at this point in the history
…11598)

Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
  • Loading branch information
aslushnikov and pavelfeldman authored Jan 24, 2022
1 parent 88bf78c commit 9422974
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/playwright-test/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ export function transformHook(code: string, filename: string, tsconfig: TsConfig
relative = relative.replace(/\//g, path.sep);
const result = path.resolve(tsconfig.baseUrl || '', relative);
for (const extension of extensions) {
// TODO: We can't cover this one with the hash!
if (fs.existsSync(result + extension))
return result;
return result + extension;
}
}
return name;
Expand Down
1 change: 1 addition & 0 deletions tests/playwright-test/resolver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ test('should respect baseurl w/o paths', async ({ runInlineTest }) => {
`,
});

expect(result.output).not.toContain('Could not');
expect(result.passed).toBe(1);
expect(result.exitCode).toBe(0);
});
Expand Down

0 comments on commit 9422974

Please sign in to comment.