Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 458b89e

Browse files
authored
Ensuring state endpoint doesn't reset state (HackYourFuture#137)
1 parent d3fe68b commit 458b89e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

week1/homework/test/server.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ testCmd(9, 'subtract');
5454
testCmd(10, 'reset');
5555
testCmd(10, 'add', 'reset');
5656
testCmd(10, 'subtract', 'reset');
57-
testCmd(12, 'add', 'add', 'add', 'subtract');
58-
testCmd(11, 'subtract', 'subtract', 'reset', 'add', 'subtract', 'add');
59-
testCmd(20, ...range(10).map(() => 'add'));
60-
testCmd(0, ...range(10).map(() => 'subtract'));
57+
testCmd(12, 'add', 'add', 'state', 'add', 'subtract');
58+
testCmd(11, 'subtract', 'subtract', 'reset', 'add', 'state', 'subtract', 'add');
59+
testCmd(20, ...range(10).map(() => 'add'), 'state');
60+
testCmd(0, ...range(10).map(() => 'subtract'), 'state');
6161

6262
test(
6363
'querying undefined URL returns 404 Not Found',

0 commit comments

Comments
 (0)