Skip to content

Commit 323f58f

Browse files
committed
added helper for round to nearest half for cypress
1 parent b97bfc0 commit 323f58f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-bitloops",
3-
"version": "0.3.9",
3+
"version": "0.3.10",
44
"description": "Next.js with TypeScript, Tailwind, Storybook and Cypress generator by Bitloops",
55
"license": "MIT",
66
"author": "Bitloops S.A.",

setup/templates/cypress/helpers/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ export const areVerticalRightAligned = (rects: DOMRect[]): boolean => {
5555
}
5656
return true;
5757
};
58+
59+
export const roundToNearestHalf = (num: number): number => {
60+
return Math.round(num * 2) / 2;
61+
};

0 commit comments

Comments
 (0)