MCPcopy
hub / github.com/graphile/starter / main

Function main

scripts/test.js:73–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73function main() {
74 const opts = {
75 stdio: "inherit",
76 cwd: process.cwd(),
77 };
78
79 // Reset the test database
80 execSync("yarn db gm reset --shadow --erase", opts);
81 execSync("yarn db watch --once --shadow", opts);
82
83 if (watchMode) {
84 // We're in watch mode, so keep watching the `current.yml` file
85 concurrently(
86 [
87 {
88 name: "jest",
89 command: `cross-env NODE_OPTIONS=\"--inspect=9876\" jest -i ${watchMode}`,
90 prefixColor: "greenBright",
91 },
92 {
93 name: "testdb",
94 command: "yarn db watch --shadow",
95 prefixColor: "blue",
96 },
97 ],
98 {
99 killOthers: ["failure"],
100 }
101 );
102 } else {
103 // Run once, so just run the tests
104 const argsWithoutDelayArg = cmdArgs.filter((arg) => arg !== "--delay");
105 spawnSync("jest", ["-i", ...argsWithoutDelayArg], opts);
106 }
107}

Callers 2

_setup_utils.jsFile · 0.70
test.jsFile · 0.70

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected