Tag: Mocha
-
Post Views: 16 1. Reference: In Refactoring: Improve the Design of Existing Code (2nd Edition), run test cases based on Mocha. 2. MOCHA allows you to use any of the assertion libraries you want. In the above example, we used Node.js’s built-in assertion module. Schedule to use assertion library Chai. 3. Reference:https://mochajs.org/#assertions. The assertion library Chai supports expect(), assert() and…
-
Post Views: 38 1. Search in Githab: mocha, select the first one: mochajs/mocha, a simple, flexible and interesting JavaScript test framework for node.js and browsers. as shown in Figure 1 2. Click the link documentation to enterhttps://mochajs.org/ 3. Reference installation:https://mochajs.org/#installation, as a project development dependency, use npm to install, enter the project directory: npm install –save-dev mocha. as shown in…
