be83489acc | ||
---|---|---|
.. | ||
demo | ||
exercise | ||
README.md |
README.md
Step 2.4
Testing Typescript code with jest. jest is a test framework made by Facebook and is very popular in the React and the wider JS ecosystem. We will work on implementing simple unit tests here in this exercise.
We won't go too deeply into mocks in this exercise, but feel free to play around with that yourself by reading up on this:
https://jestjs.io/docs/en/mock-functions
Exercise
-
copy the generic
Stack<T>
code you have developed in Step 2.1 -
Run the tests by running
npm test
at the root of the bootcamp project -
Follow the instructions inside the
stack.spec.ts
file to complete the two tests