Skip to content

Commit 287a4ca

Browse files
committed
chore: fix tests on unix* systems
1 parent 310a4dd commit 287a4ca

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules/
33
.vscode
44
.eslintcache
55
yarn-error.log
6+
.nyc_output

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
"name": "plop-monorepo",
33
"version": "0.0.0",
44
"private": true,
5-
"workspaces": [
6-
"packages/*"
7-
],
5+
"workspaces": {
6+
"packages": [
7+
"packages/*"
8+
],
9+
"nohoist": [
10+
"**/plop-pack-fancy-comments"
11+
]
12+
},
813
"type": "module",
914
"scripts": {
1015
"bootstrap": "lerna exec yarn install",

packages/plop/tests/input-processing.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { fileURLToPath } from "node:url";
55
const __dirname = dirname(fileURLToPath(import.meta.url));
66

77
test("should report a missing plopfile when not copied", async () => {
8-
const { findByError } = await renderPlop();
8+
// The directory above this repo. We look up towards `plopfile.js` and found one at root otherwise.
9+
const cwd = resolve(__dirname, '../../../..');
10+
const { findByError } = await renderPlop([], {cwd});
911
expect(await findByError(/\[PLOP\] No plopfile found/)).toBeInTheConsole();
1012
});
1113

0 commit comments

Comments
 (0)