mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
feat(supported-version): validate custom_versions
Previously, @danslo reported that he tried to use `custom_versions` without setting the kind. This isn't the correct behavior. I've added a validator to alert him of this.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { validateKind } from "./validate-kinds";
|
||||
|
||||
describe('validateKind', () => {
|
||||
it('returns `true` if its a valid kind', () => {
|
||||
expect(validateKind("latest")).toBe(true);
|
||||
});
|
||||
|
||||
it('throws a helpful exception if its an invalid kind', () => {
|
||||
expect(() => validateKind(<any>"taco")).toThrowError();
|
||||
})
|
||||
|
||||
it('throws a helpful exception if custom versions are provided with the wrong kind', () => {
|
||||
expect(() => validateKind(<any>"latest", [])).toThrowError();
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user