This repository has been archived by the owner on Nov 14, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efb0485
commit d789526
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
var describe = require('Jody').describe; | ||
|
||
var value = ""; | ||
|
||
require.('Jody').beforeAll(function () { | ||
value = "set in beforeAll" | ||
|
||
}); | ||
|
||
describe('New Api'). | ||
it("Should have a global before all", function () { | ||
value.should().beEqual("npmset in beforeAll"); | ||
}). | ||
it("Should make async easy", function () { | ||
var counter = 0; | ||
|
||
setTimeout(function () { | ||
counter++; | ||
|
||
counter.should().beEqual(1); | ||
async_complete(); | ||
}, 10); | ||
|
||
async_wait(); | ||
}). | ||
it("Should support multiple callbacks", function () { | ||
var counter = 0; | ||
|
||
setTimeout(function () { | ||
counter++; | ||
|
||
counter.should().beEqual(1); | ||
async_complete(); | ||
},10); | ||
|
||
setTimeout(function () { | ||
counter++; | ||
|
||
counter.should().beEqual(2); | ||
async_complete(); | ||
},20); | ||
|
||
async_wait(2); | ||
}); | ||
|
||
|
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