chore: change import assert to readFile (#368)
This commit is contained in:
parent
35e6c49d7c
commit
91ae93c167
4 changed files with 8 additions and 6 deletions
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
import fs from 'node:fs';
|
||||
import url from 'node:url';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
@ -381,3 +382,6 @@ async function createUserDataDir(browserConfig: Config['browser']) {
|
|||
export async function generateLocator(locator: playwright.Locator): Promise<string> {
|
||||
return (locator as any)._generateLocatorString();
|
||||
}
|
||||
|
||||
const __filename = url.fileURLToPath(import.meta.url);
|
||||
export const packageJSON = JSON.parse(fs.readFileSync(path.join(path.dirname(__filename), '..', 'package.json'), 'utf8'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue