Migrate monorepo to Zod 4
This commit is contained in:
@@ -33,6 +33,34 @@ describe("paseo config schema", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("normalizes partial worktree lifecycle config without dropping present commands", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
worktree: {
|
||||
setup: 'echo "setup ran" > setup.log',
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
worktree: {
|
||||
setup: ['echo "setup ran" > setup.log'],
|
||||
teardown: [],
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
worktree: {
|
||||
teardown: ["npm run clean"],
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
worktree: {
|
||||
setup: [],
|
||||
teardown: ["npm run clean"],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("parses all metadata generation instruction entries", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
|
||||
Reference in New Issue
Block a user