Skip to content

Commit

Permalink
test: add more test #5
Browse files Browse the repository at this point in the history
Signed-off-by: seven <[email protected]>
  • Loading branch information
Blankll committed Sep 23, 2024
1 parent 9425ae9 commit 6431dd7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/stack/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@ describe('unit test for validate', () => {
target: 'hello',
},
},
};
expect(() => validateYaml(invalidYaml as unknown as RawServerlessIac)).toThrow('Invalid yaml');
} as unknown as RawServerlessIac;
expect(() => validateYaml(invalidYaml)).toThrow('Invalid yaml');
});

it('should throw error when functions are not specified', () => {
const invalidYaml = {
...jsonIac,
functions: null,
} as unknown as RawServerlessIac;
expect(() => validateYaml(invalidYaml)).toThrow('Invalid yaml');
});
});

0 comments on commit 6431dd7

Please sign in to comment.