Skip to content

Instantly share code, notes, and snippets.

@ChenReuven
Last active September 18, 2024 15:11
Show Gist options
  • Save ChenReuven/182be51234110b8319c7ed7ae3fbc7ae to your computer and use it in GitHub Desktop.
Save ChenReuven/182be51234110b8319c7ed7ae3fbc7ae to your computer and use it in GitHub Desktop.
ChatGPT for FED
1. Code: Wrote me specific code for specific contexts and scenarios.
- ChatGPT Prompt: "wrote me an react application that get pokemon from PokeAPI and show list of pokemones."
2. Unit Test: Wrote me a Unit Test for the related code (and update existing code with specific npm library/libraries)
- ChatGPT Prompt: "can you wrote me a jest unit test for "pokemonList" component with 100% coverage?"
- add @testing-library/react npm package :)
- ChatGPT Prompt: "can you imporve it by adding npm testing-library?"
3. Add a11y: accessibility improvements
- ChatGPT Prompt: "can you add a11y test for it?"
4. Add a playwright e2e library to the game
- ChatGPT Prompt: "can you wrote me a playwright tests for this code?"
5. Add Mocking to test via MSW library:
- ChatGPT Prompt: "can you use msw for mock api call on "PokemonList" component code"
6. Refactor all the code to support the SolidJS framework
- ChatGPT Prompt: "can you refactor the code to support SolidJS framework?"
7. Insert React Query + S.O.L.I.D principles to the game
- ChatGPT Prompt: "can you wrote this code based on S.O.L.I.D princples with react query library?"
8. "Spice it" a bit with Typescript types/interfaces
- ChatGPT Prompt: "can you add typescript types to the code?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment