FOS React and javascript snippets
Installation
Visual Studio Marketplace
Launch Quick Open:
Paste the following command and press Enter :
ext install oicramps-meli.fos-snippets
Supported languages (file extensions)
- JavaScript (.js)
- JavaScript React (.jsx)
Basic
React
Prefix |
Description |
mptr→ |
Creates a propTypes block and its import |
mptdr→ |
Creates a propTypes and defaultProps blocks along with its import |
mdp→ |
Creates a defaultProps block |
React hooks
Unit tests
General
Prefix |
Description |
mtr→ |
Creates a testing library test pattern |
mtcsr |
Creates a testing library test pattern with custom state (CommonsJS) |
mdes→ |
Creates a test describe block |
msd→ |
Creates a testing library debug command |
mturr→ |
Creates a custom render import (CommonsJS) |
mtur→ |
Creates a custom render import (ESModules) |
msc→ |
Creates a setup execution extracting the returned container |
mit→ |
Creates a test block |
Queries
Prefix |
Description |
mgbr→ |
Creates a getByRole selector |
mgbrn→ |
Creates a getByRole selector with a name option |
mgblt |
Creates a getByLabelText selector |
mgbt |
Creates a getByText selector |
mgbti |
Creates a getByTestId selector |
Enjoy!
| |