Question: Problem 01 Part 1 - observationSummary() function with for loop observationSummary() should log correct format of all cases expect(received).toEqual(expected) // deep equality Expected: StringMatching /^#d+

Problem 01 Part 1 - observationSummary() function with for loop observationSummary() should log correct format of all cases

expect(received).toEqual(expected) // deep equality

Expected: StringMatching /^#\d+ - .+ \[\d{4}-\d{2}-\d{2}\]$/i Received: "#67868131 - Muskrat (2021-01-10)"

27 | 28 | consoleOutput.forEach((output) => > 29 | expect(output).toEqual( | ^ 30 | // We expect a string like "#67868131 - Muskrat [2021-01-10]" 31 | expect.stringMatching(/^#\d+ - .+ \[\d{4}-\d{2}-\d{2}\]$/i) 32 | )

at toEqual (src/problem-01.test.js:29:22) at Array.forEach () at Object.forEach (src/problem-01.test.js:28:19)

Problem 01 Part 2 - observationSummary2() function with for loop observationSummary2() should log correct format of all cases

expect(received).toEqual(expected) // deep equality

Expected: StringMatching /^#\d+ - .+ \[\d{4}-\d{2}-\d{2}\]$/i Received: "#67868131 - Muskrat (2021-01-10)"

59 | 60 | consoleOutput.forEach((output) => > 61 | expect(output).toEqual( | ^ 62 | // We expect a string like "#67868131 - Muskrat [2021-01-10]" "#67868131 (2021-01-10) Muskrat" 63 | expect.stringMatching(/^#\d+ - .+ \[\d{4}-\d{2}-\d{2}\]$/i) 64 | )

at toEqual (src/problem-01.test.js:61:22) at Array.forEach () at Object.forEach (src/problem-01.test.js:60:19)

Test Suites: 1 failed, 1 total Tests: 2 failed, 2 passed, 4 total Snapshots: 0 total Time: 0.205 s, estimated 1 s Ran all test suites matching /problem-01.test/i.

Watch Usage: Press w to show more.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!