https://github.com/oliverjash/playwright-pkg-require-with-path
https://github.com/oliverjash/playwright-pkg-require-with-path
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/oliverjash/playwright-pkg-require-with-path
- Owner: OliverJAsh
- Created: 2023-08-23T11:32:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T11:32:44.000Z (almost 2 years ago)
- Last Synced: 2025-01-16T22:12:33.365Z (5 months ago)
- Language: TypeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```sh-session
$ yarn
$ yarn playwright test
yarn run v1.22.19
Error: Cannot find module 'app/my-pkg'
Require stack:
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/tests/example.spec.ts
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/transform/transform.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/common/config.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/reporters/json.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/reporters/raw.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/reporters/html.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/runner/reporters.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/runner/runner.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/lib/cli.js
- /Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/node_modules/@playwright/test/cli.jsat example.spec.ts:2
1 | // ❌ Using path, it doesn't work.
> 2 | import * as x from 'app/my-pkg';
| ^
3 | // ✅ Not using path, it works.
4 | // import * as x from '../app/my-pkg';
5 |at Object. (/Users/oliver/Code/Reduced test cases/playwright-pkg-require-with-path/tests/example.spec.ts:2:1)
Error: No tests found
To open last HTML report run:
npx playwright show-report
error Command failed with exit code 1.
```