diff --git a/tests/setup.ts b/tests/setup.ts index cb9dd74b..b0866bff 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -10,7 +10,10 @@ const testsPackage = z .object({productName: z.string()}) .parse( JSON.parse( - fs.readFileSync(new URL("package.json", import.meta.url), "utf8"), + fs.readFileSync( + new URL("zulip-test/package.json", import.meta.url), + "utf8", + ), ), ); @@ -18,7 +21,7 @@ const testsPackage = z // Returns a promise that resolves to an Electron Application once the app has loaded. export async function createApp(): Promise { return _electron.launch({ - args: [import.meta.dirname], // Ensure this dir has a package.json file with a 'main' entry point + args: [path.join(import.meta.dirname, "zulip-test")], // Ensure this dir has a package.json file with a 'main' entry point }); } diff --git a/tests/package.json b/tests/zulip-test/package.json similarity index 64% rename from tests/package.json rename to tests/zulip-test/package.json index 2a24e361..918e7ebb 100644 --- a/tests/package.json +++ b/tests/zulip-test/package.json @@ -2,5 +2,5 @@ "version": "5.9.3", "productName": "ZulipTest", "type": "module", - "main": "../dist-electron/index.cjs" + "main": "../../dist-electron/index.cjs" } diff --git a/xo.config.ts b/xo.config.ts index f11f2594..930521a9 100644 --- a/xo.config.ts +++ b/xo.config.ts @@ -164,11 +164,5 @@ const xoConfig: FlatXoConfig = [ ], }, }, - { - files: ["tests/**"], - rules: { - "n/no-extraneous-import": "off", // https://github.com/eslint-community/eslint-plugin-n/issues/209 - }, - }, ]; export default xoConfig;