fix: suppress SQLite ExperimentalWarning in edge-cases and schema-validation tests

The local runCli helpers in edge-cases.test.ts (Phase 3/4/7) and raw
execFileSync calls in schema-validation.test.ts (tests 2.1, 2.3) were
missing NODE_NO_WARNINGS=1, causing ExperimentalWarning to leak into
stderr snapshots. Added env override to match what helpers.runCli
already does.
This commit is contained in:
2026-06-04 00:36:38 +00:00
parent 13b12ef50c
commit e4e4ce0f73
4 changed files with 11 additions and 30 deletions
@@ -373,11 +373,7 @@ exports[`Phase 3: Variable System > 3.10 var delete removes variable 1`] = `
}
`;
exports[`Phase 3: Variable System > 3.11 var get deleted variable returns not found 1`] = `
"(node:310067) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use \`node --trace-warnings ...\` to show where the warning was created)
Error: Variable not found: name=@myapp/config, schema=FRBAB1BF0ZBCS"
`;
exports[`Phase 3: Variable System > 3.11 var get deleted variable returns not found 1`] = `"Error: Variable not found: name=@myapp/config, schema=FRBAB1BF0ZBCS"`;
exports[`Phase 4: Template System > 4.1 template set registers template 1`] = `
{
@@ -417,29 +413,13 @@ exports[`Phase 4: Template System > 4.4 template delete removes template 1`] = `
}
`;
exports[`Phase 4: Template System > 4.5 template get deleted template returns not found 1`] = `
"(node:310291) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use \`node --trace-warnings ...\` to show where the warning was created)
Error: Template not found for schema: FRBAB1BF0ZBCS"
`;
exports[`Phase 4: Template System > 4.5 template get deleted template returns not found 1`] = `"Error: Template not found for schema: FRBAB1BF0ZBCS"`;
exports[`Phase 7: Edge Cases > 7.1 get non-existent hash errors gracefully 1`] = `
"(node:309275) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use \`node --trace-warnings ...\` to show where the warning was created)
Node not found: AAAAAAAAAAAAA"
`;
exports[`Phase 7: Edge Cases > 7.1 get non-existent hash errors gracefully 1`] = `"Node not found: AAAAAAAAAAAAA"`;
exports[`Phase 7: Edge Cases > 7.3 var set empty name errors 1`] = `
"(node:309358) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use \`node --trace-warnings ...\` to show where the warning was created)
Usage: ocas var set <name> <hash> [--tag <tag>...]"
`;
exports[`Phase 7: Edge Cases > 7.3 var set empty name errors 1`] = `"Usage: ocas var set <name> <hash> [--tag <tag>...]"`;
exports[`Phase 7: Edge Cases > 7.4 var set name with invalid chars errors 1`] = `
"(node:309380) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use \`node --trace-warnings ...\` to show where the warning was created)
Error: Invalid variable name "invalid name!": Name must follow @scope/name format (e.g. @myapp/config)"
`;
exports[`Phase 7: Edge Cases > 7.4 var set name with invalid chars errors 1`] = `"Error: Invalid variable name "invalid name!": Name must follow @scope/name format (e.g. @myapp/config)"`;
exports[`Phase 7: Edge Cases > 7.5 no subcommand shows help text 1`] = `
"Usage: ocas [--home <path>] [--json] <command> [args]
@@ -1,7 +1,3 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Phase 2: Schema Validation > 2.3 put against non-existent schema hash fails 1`] = `
"(node:311027) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use \`node --trace-warnings ...\` to show where the warning was created)
Schema not found: AAAAAAAAAAAAA"
`;
exports[`Phase 2: Schema Validation > 2.3 put against non-existent schema hash fails 1`] = `"Schema not found: AAAAAAAAAAAAA"`;
+3
View File
@@ -52,6 +52,7 @@ describe("Phase 7: Edge Cases", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
@@ -177,6 +178,7 @@ describe("Phase 3: Variable System", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
@@ -379,6 +381,7 @@ describe("Phase 4: Template System", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
@@ -610,6 +610,7 @@ describe("Phase 2: Schema Validation", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
).trim();
} catch (e: unknown) {
@@ -635,6 +636,7 @@ describe("Phase 2: Schema Validation", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
} catch (e: unknown) {