Repository for saving course learning "JavaScript-Expert"
What's new | Concept |
---|---|
✅ Mocks | Objects that simulate the behavior of real objects in a controlled way |
✅ rejects (assert) | If asyncFn is a function and it throws an error synchronously, assert.rejects() will return a rejected Promise with that error. If the function does not return a promise, assert.rejects() will return a rejected Promise with an ERR_INVALID_RETURN_VALUE error. In both cases the error handler is skipped. |
✅ deepStrictEqual (assert) | That's compare the return value with the expected value |
JSON.parse(withoutStub)
What's new | Concept |
---|---|
✅ "node service.test.js > mocks/tatooine.json" | Run script and write the node result to the new file |
✅ SINON | Create a role to change the role's default behavior. Still working without connection |