You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/assignments/hw4-25.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ We will be using the [Jest](https://jestjs.io) unit testing framework for Javasc
26
26
27
27
Follow [these instructions](https://jestjs.io/docs/getting-started) to install the Jest framework in your calculator front end and backend applications. We have already created a test directory in calculator-backend to store your new test cases. The tests in the frontend code are in the src/ subdirectory of calculator-frontend.
28
28
29
-
Let's fix one configuration error in the calculator code.
29
+
Let's fix one configuration error in the calculator code; this is necessary because of a bug in Jest/Axios interactions.
30
30
31
31
Edit calculator-frontend/package.json. Change the line starting with "test" inside of the "scripts" object to read:
32
32
@@ -38,7 +38,7 @@ Edit calculator-frontend/package.json. Change the line starting with "test" insi
38
38
39
39
### 2. Run our test cases
40
40
41
-
Jest runs all files whose name ends in .test.js.
41
+
Jest runs all files whose names end in .test.js.
42
42
In calculator-backend/tests, there's a file called calculate.test.js. The code currently in there tests the calculate function by evaluating 2+3 and making sure the function returns 5.
43
43
44
44
Run the test by executing:
@@ -149,7 +149,7 @@ ensure that no two members test the same feature.
149
149
150
150
#### Turn in instructions
151
151
152
-
Copy your test code into the PDF that you turn in. Also take a screenshot that shows your new test cases passing and put this in the PDF as well.
152
+
Take a screenshot that shows your new test cases passing and put this in your PDF.
0 commit comments