mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-25 01:41:05 -05:00
Added tests for action-parameter-factory-options
This commit is contained in:
parent
c4d70fd871
commit
f9426336e6
1 changed files with 29 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
import { ActionParameterFactoryOptions } from "@/utils/actions/action-parameter-factory-options";
|
||||
|
||||
describe("ActionParameterFactoryOptions", () => {
|
||||
describe("parse", () => {
|
||||
test("parses all its own formatted values", () => {
|
||||
for (const value of ActionParameterFactoryOptions.values()) {
|
||||
expect(ActionParameterFactoryOptions.parse(ActionParameterFactoryOptions.format(value))).toBe(value);
|
||||
}
|
||||
});
|
||||
|
||||
test("parses all friendly names of its own values", () => {
|
||||
for (const value of ActionParameterFactoryOptions.values()) {
|
||||
expect(ActionParameterFactoryOptions.parse(ActionParameterFactoryOptions.friendlyNameOf(value))).toBe(value);
|
||||
}
|
||||
});
|
||||
|
||||
test("parses all its own formatted values in lowercase", () => {
|
||||
for (const value of ActionParameterFactoryOptions.values()) {
|
||||
expect(ActionParameterFactoryOptions.parse(ActionParameterFactoryOptions.format(value).toLowerCase())).toBe(value);
|
||||
}
|
||||
});
|
||||
|
||||
test("parses all its own formatted values in UPPERCASE", () => {
|
||||
for (const value of ActionParameterFactoryOptions.values()) {
|
||||
expect(ActionParameterFactoryOptions.parse(ActionParameterFactoryOptions.format(value).toUpperCase())).toBe(value);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue