File: test/test.multiple.js

Recommend this page to a friend!
  Classes of Javier Camelis   Qlite   test/test.multiple.js   Download  
File: test/test.multiple.js
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Qlite
Processes conditions asynchronously using promises
Author: By
Last change: Update of test/test.multiple.js
Date: 2 years ago
Size: 423 bytes


Class file image Download
QUnit.test( "Multiple Defer", function( assert ) { var defer1 = Q.defer(); var defer2 = Q.defer(); var actual = false; Q.all([defer1, defer2]).then(function () { actual = true; }); assert.ok(!actual, "Not triggered yet!"); defer1.resolve(); assert.ok(!actual, "Not triggered yet!"); defer2.resolve(); assert.ok(actual, "already triggered"); });