Skip to content

Commit 458f6d9

Browse files
committed
test: run yarn prepare before running tests
This is required because the test projects contain webpack config files that import the parent project, so the parent project must be built first. Since migrating to yarn 3, the project is not necessarily built (and does not otherwise need to be built) before tests are run.
1 parent 1781d68 commit 458f6d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import {fork} from "child_process";
22
import {resolve} from "path";
33
import test from "ava";
44

5+
test.before(async () => {
6+
await yarn(".", ["prepare"]);
7+
})
8+
59
async function buildTestProject(path: string): Promise<void> {
610
return yarn(path, [])
711
.then(code => (code === 0 ? yarn(path, ["build"]) : code))

0 commit comments

Comments
 (0)