Skip to content

Instantly share code, notes, and snippets.

View Choicelin's full-sized avatar
💯
online

V2R Choicelin

💯
online
View GitHub Profile
@Choicelin
Choicelin / 提问的智慧.md
Created August 5, 2022 04:00 — forked from alsotang/提问的智慧.md
Simplified Chinese edition of "How To Ask Questions The Smart Way"
@Choicelin
Choicelin / mocha-guide-to-testing.js
Created October 9, 2018 06:19 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()