Sign in

QUnit

@qunitjs.com
32 followers 17 following 8 posts

The powerful, easy-to-use JavaScript testing framework. Docs: qunitjs.com
 Source: github.com/qunitjs/qunit #qunit #javascript #typescript #nodejs #tdd #jquery #emberjs

PostsRepliesMedia
QUnit @qunitjs.com · 30/01/2026
Stickers packed and ready for FOSDEM! Message me to meet and take some! #fosdem #fosdem2026 #qunit #jquery
Two rolls of QUnit stickers, as well as various jQuery "Keep calm and call on()" stickers, Wikipedia stickers, and MediaWiki logo stickers.
030
QUnit @qunitjs.com · 20/04/2025
Ever wondered how beforeEach works in a unit test framework? qunitjs.com/lifecycle/ While people generally guess right, this demonstrates that the order is guaranteed, and showcases what's possible when you depend on it. Thanks to FND, Jan D, and NullVoxPopuli for their help! #qunit
Imagine a test with global hooks, and a Parent and Child module that use hooks also. The execution order is:
1. Parent module runs the before hook.
2. Every test in the Parent module inherits context from the before hook, and repeats as follows: call global beforeEach, parent beforeEach, the actual test, parent afterEach, and lastly the global afterEach.
3. The Child module inherits context from the Parent before hook, and then runs its own before hook.
4. Every test in the Child module inherits context from this before hook, and repeats as follows: call global beforeEach, parent beforeEach, child beforeEach, the actual test, child afterEach, parent afterEach, and lastly the global afterEach.
021