Skip to content

Commit a6c91e5

Browse files
committed
build: configure project to use ES modules
- Add "type": "module" to package.json to enable ES modules - Update playwright.config.ts to use ES module import path syntax - Replace CommonJS require.resolve() with direct module path reference
1 parent b3fbf06 commit a6c91e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@netcracker/qubership-apihub-ui-tests",
33
"version": "2.36.1-dev.0",
44
"license": "Apache-2.0",
5+
"type": "module",
56
"scripts": {
67
"html-report": "playwright show-report reports/playwright",
78
"debug": "playwright test --project=Portal --debug",

playwright.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import process from 'node:process'
77
* Read environment variables from file.
88
* https://github.com/motdotla/dotenv
99
*/
10-
// require('dotenv').config();
1110

1211
/**
1312
* See https://playwright.dev/docs/test-configuration.
@@ -45,7 +44,7 @@ export default defineConfig<Fixtures>({
4544
['list'],
4645
['./src/services/custom-reporter/CustomReporter.ts', { reportType: 'apihub-styled-html' }],
4746
],
48-
globalSetup: require.resolve('./src/tests/global-setup'),
47+
globalSetup: './src/tests/global-setup.ts',
4948
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
5049
use: {
5150
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */

0 commit comments

Comments
 (0)