Skip to content

Instantly share code, notes, and snippets.

View chuckplantain's full-sized avatar

Flaming BombaDeen chuckplantain

  • Cape Neddick, Maine
View GitHub Profile
@chuckplantain
chuckplantain / executionOrderJestJasmine.js
Created April 5, 2018 13:59
Execution order of async Jest/Jasmine test code
/**
* Demonstrate execution order of code in Jest/Jasmine
*/
function resolveAfter2Seconds(message) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(message)
}, Math.ceil(Math.random() * 5000))
})