aboutsummaryrefslogtreecommitdiffstats
path: root/tools/node_modules/expresso/test/serial/async.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/expresso/test/serial/async.test.js')
-rw-r--r--tools/node_modules/expresso/test/serial/async.test.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/node_modules/expresso/test/serial/async.test.js b/tools/node_modules/expresso/test/serial/async.test.js
new file mode 100644
index 0000000..c596d5c
--- /dev/null
+++ b/tools/node_modules/expresso/test/serial/async.test.js
@@ -0,0 +1,39 @@
+
+var assert = require('assert')
+ , setup = 0
+ , order = [];
+
+module.exports = {
+ setup: function(done){
+ ++setup;
+ done();
+ },
+
+ a: function(done){
+ assert.equal(1, setup);
+ order.push('a');
+ setTimeout(function(){
+ done();
+ }, 500);
+ },
+
+ b: function(done){
+ assert.equal(2, setup);
+ order.push('b');
+ setTimeout(function(){
+ done();
+ }, 200);
+ },
+
+ c: function(done){
+ assert.equal(3, setup);
+ order.push('c');
+ setTimeout(function(){
+ done();
+ }, 1000);
+ },
+
+ d: function(){
+ assert.eql(order, ['a', 'b', 'c']);
+ }
+}; \ No newline at end of file