Last active
February 13, 2016 20:32
-
-
Save ORESoftware/bcab3bcaa36427ec7cce to your computer and use it in GitHub Desktop.
Suman using serial execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const assert = require('assert'); | |
const suman = require('suman'); | |
///////////////////////////////////////////////////// | |
var Test = suman.init(module); | |
///////////////////////////////////////////////////// | |
function promiseTimeout(t) { | |
process.stdout.write('begin: ' + t.desc + '\n'); | |
return new Promise(function (resolve) { | |
setTimeout(function () { | |
process.stdout.write('end: ' + t.desc + '\n'); | |
resolve(); | |
}, 1000); | |
}) | |
} | |
Test.describe('@Test1', function () { | |
this.it('one', t => { | |
return promiseTimeout(t); | |
}); | |
this.it('two', t => { | |
return promiseTimeout(t); | |
}); | |
this.it('three', t => { | |
return promiseTimeout(t); | |
}); | |
this.it('four', (t) => { | |
return promiseTimeout(t); | |
}); | |
this.it('five', t => { | |
return promiseTimeout(t); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment