Skip to content

Commit b35cf13

Browse files
committed
tests: Move tests/package.json to its own folder.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 814de8a commit b35cf13

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

tests/setup.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ const testsPackage = z
1010
.object({productName: z.string()})
1111
.parse(
1212
JSON.parse(
13-
fs.readFileSync(new URL("package.json", import.meta.url), "utf8"),
13+
fs.readFileSync(
14+
new URL("zulip-test/package.json", import.meta.url),
15+
"utf8",
16+
),
1417
),
1518
);
1619

1720
// Runs Zulip Desktop.
1821
// Returns a promise that resolves to an Electron Application once the app has loaded.
1922
export async function createApp(): Promise<ElectronApplication> {
2023
return _electron.launch({
21-
args: [import.meta.dirname], // Ensure this dir has a package.json file with a 'main' entry point
24+
args: [path.join(import.meta.dirname, "zulip-test")], // Ensure this dir has a package.json file with a 'main' entry point
2225
});
2326
}
2427

tests/package.json renamed to tests/zulip-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"version": "5.9.3",
33
"productName": "ZulipTest",
44
"type": "module",
5-
"main": "../dist-electron/index.cjs"
5+
"main": "../../dist-electron/index.cjs"
66
}

xo.config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,5 @@ const xoConfig: FlatXoConfig = [
164164
],
165165
},
166166
},
167-
{
168-
files: ["tests/**"],
169-
rules: {
170-
"n/no-extraneous-import": "off", // https://github.com/eslint-community/eslint-plugin-n/issues/209
171-
},
172-
},
173167
];
174168
export default xoConfig;

0 commit comments

Comments
 (0)