Skip to content

Commit

Permalink
Math.sign added
Browse files Browse the repository at this point in the history
  • Loading branch information
beumsk committed Sep 20, 2024
1 parent d5194aa commit 2d270d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions JS.js
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,10 @@
Math.PI // 3.141592653589793


// Math.sign; returns -1 or 1 based on number
Math.sign(-11); // -1


// eval; takes a string and do the math
eval("10 * 5 + 10 / 2") // 55

Expand Down
2 changes: 1 addition & 1 deletion React.js
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ debugger;
expect(el).toHaveClass('class-name');
expect(el).toHaveAttribute('href', '/');
expect(els).toHaveLength(3); // 3 elements in array
// use watFor to ensure elements are rendered (fetched)
// use waitFor to ensure elements are rendered (fetched)
await waitFor(async () => {
const el = await screen.findAllByRole('button');
expect(el).toHaveLength(2);
Expand Down

0 comments on commit 2d270d0

Please sign in to comment.