Skip to content

Commit

Permalink
codecov line
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Sep 5, 2023
1 parent 2d9ba30 commit ebf8fa5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/static/tests/unit/components/options/numericInput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ describe("NumericInput", () => {
expect(mockTooltipDirective).toHaveBeenCalledTimes(2);
});

it("does min validation when min is 0", async () => {
const wrapper = getWrapper(1, Infinity, 0);
await wrapper.find("input").setValue("-1");
expect(wrapper.emitted("update")![0]).toStrictEqual([0]);
const { tooltipProps } = wrapper.vm as any;
expect(tooltipProps.content).toBe("Please enter a non-negative number");
});

it("does min validation (array)", async () => {
const wrapper = getWrapper(12, Infinity, [
{ number: 12, message: "middle tooltip" },
Expand Down

0 comments on commit ebf8fa5

Please sign in to comment.