@factorialco/shadowdog
Version:
<img src="https://raw.githubusercontent.com/factorialco/shadowdog/refs/heads/main/logo.png" alt="drawing" width="100"/>
33 lines (32 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const config_1 = require("./config");
const vitest_1 = require("vitest");
(0, vitest_1.it)('shadowdog does not accept an invalid config', () => {
(0, vitest_1.expect)(() => config_1.configSchema.parse({})).toThrow();
});
(0, vitest_1.it)('shadowdog accepts a valid config', () => {
(0, vitest_1.expect)(() => config_1.configSchema.parse({
$schema: 'https://raw.githubusercontent.com/factorialco/shadowdog/refs/heads/main/src/config/schema.json',
plugins: [
{
name: 'shadowdog-local-cache',
},
],
watchers: [
{
files: ['example.txt'],
commands: [
{
artifacts: [
{
output: 'example.output.txt',
},
],
command: 'cp example.txt example.output.txt',
},
],
},
],
})).not.toThrow();
});