JavaScript Event-loop, Call Stack and Task Queue explain
Event Loop Simulation Xem ví dụ Tham Khảo: https://nodejs.org/en/docs/guides/dont-block-the-event-loop/ https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/ https://dev.to/mnhattt/kin-trc-x-l-bt-ng-b-trong-nodejs-nnf
“Arrange-Act-Assert” a pattern for arranging code in UnitTest
Each method should group code into these functional sections, separated by blank lines: Arrange all necessary preconditions and inputs.Act on the object or method under test.Assert that the expected results have occurred. Examples Benefits Clearly separates what is being tested from the setup and verification steps. Clarifies and focuses attention on a historically successful and generally necessary set of test steps. Makes some Test-Smells more obvious Assertions intermixed with “Act” …
“Arrange-Act-Assert” a pattern for arranging code in UnitTest Read More »
Test Double
Gerard Meszaros is working on a book to capture patterns for using the various Xunit frameworks. One of the awkward things he’s run into is the various names for stubs, mocks, fakes, dummies, and other things that people use to stub out parts of a system for testing. To deal with this he’s come up with his own vocabulary which I think is worth spreading further. The generic term he uses is a Test Double (think …