tests: Move tests/package.json to its own folder.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-08-05 15:58:11 -07:00
parent 814de8ad6a
commit b35cf13a77
3 changed files with 6 additions and 9 deletions

View File

@@ -10,7 +10,10 @@ const testsPackage = z
.object({productName: z.string()}) .object({productName: z.string()})
.parse( .parse(
JSON.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. // Returns a promise that resolves to an Electron Application once the app has loaded.
export async function createApp(): Promise<ElectronApplication> { export async function createApp(): Promise<ElectronApplication> {
return _electron.launch({ 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
}); });
} }

View File

@@ -2,5 +2,5 @@
"version": "5.9.3", "version": "5.9.3",
"productName": "ZulipTest", "productName": "ZulipTest",
"type": "module", "type": "module",
"main": "../dist-electron/index.cjs" "main": "../../dist-electron/index.cjs"
} }

View File

@@ -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; export default xoConfig;