Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ci:homepage-performance": "node --test scripts/__tests__/homepage-compiler.test.mjs && node scripts/homepage-performance.mjs",
"ci:test": "vitest --run --browser.headless",
"ci:test:e2e": "cypress run --config-file cypress.homepage.config.mjs --browser chrome",
"ci:test:scripts": "vitest run --config vitest.scripts.config.mjs",
"ci:test:scripts": "yarn build:scripts && vitest run --config vitest.scripts.config.mjs && node --test scripts/__tests__/generate-llms.test.mjs scripts/__tests__/test-examples.test.mjs scripts/__tests__/test-runner.test.mjs",
"ci:test:visual": "VISUAL_TESTS=1 vitest --run --browser.headless",
"ci:test:visual:update": "VISUAL_TESTS=1 VISUAL_BASELINE_UPDATE=1 vitest --run --browser.headless --update",
"clean:res": "rescript clean",
Expand Down
11 changes: 8 additions & 3 deletions apps/docs/scripts/__tests__/test-runner.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ test("run routes --update only to test-examples", () => {
},
});

assert.equal(calls.length, 2);
assert.equal(calls.length, 3);
assert.equal(calls[0].file, process.execPath);
assert.equal(path.basename(calls[0].args[0]), "test-examples.mjs");
assert.deepEqual(calls[0].args.slice(1), ["--update"]);
assert.equal(calls[1].file, process.execPath);
assert.equal(path.basename(calls[1].args[0]), "test-hrefs.mjs");
assert.deepEqual(calls[1].args.slice(1), []);
assert.equal(calls[2].file, process.execPath);
assert.equal(path.basename(calls[2].args[0]), "test-redirects.mjs");
assert.deepEqual(calls[2].args.slice(1), []);
});

test("run invokes both scripts without flags by default", () => {
test("run invokes all scripts without flags by default", () => {
let calls = [];

run({
Expand All @@ -39,9 +42,11 @@ test("run invokes both scripts without flags by default", () => {
},
});

assert.equal(calls.length, 2);
assert.equal(calls.length, 3);
assert.equal(path.basename(calls[0].args[0]), "test-examples.mjs");
assert.deepEqual(calls[0].args.slice(1), []);
assert.equal(path.basename(calls[1].args[0]), "test-hrefs.mjs");
assert.deepEqual(calls[1].args.slice(1), []);
assert.equal(path.basename(calls[2].args[0]), "test-redirects.mjs");
assert.deepEqual(calls[2].args.slice(1), []);
});
Loading