This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
differenceInCalendarYears vs differenceInYears |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mySpy.toHaveBeenCalledWith('important', 'important', expect.anything()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const parent = within(screen.getByRole('list', { name: 'test' })); | |
expect(parent.getByRole('list')).toBeVisible(); | |
expect(parent.getAllByRole('listitem')).toHaveLength(10); | |
or | |
const { getByRole, getAllByRole } = within(screen.getByRole('list', { name: 'test' })); | |
expect(getByRole('list')).toBeVisible(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://maps.googleapis.com/maps/api/geocode/json?address=XXXX&bounds=XXXX&key=XXX | |
Address: address parts separated: XX+XX+XX+XX -> Larrys+Mansion+10+Downing+Street+London+SW1A+2AA | |
Bounds: latlong top left and latlong botton right: XX,XX|XX,XX -> 49.0,-14.0|61.0,2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT='%F{yellow}%n%F{white}@%F{green}%m:%F{blue} %B%~%b 🐈 %F{red}$%F{white} ' | |
RPROMPT='${vcs_info_msg_0_}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pyramid(height) { | |
// row loop | |
for(let i = 0; i< height; i++) { | |
const whitespaces = height - (i + 1); | |
const stars = (2 * i) + 1; | |
const characters = ' '.repeat(whitespaces) + '*'.repeat(stars); | |
console.log(characters); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[:]\s(\".*\") |