-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
7d90537
commit ffe6e8e
Showing
2 changed files
with
22 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
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,21 @@ | ||
'use strict' | ||
|
||
const assert = require('assert') | ||
const test = require('.') | ||
|
||
test('synchronous passing test', t => { | ||
// This test passes because it does not throw an exception. | ||
assert.strictEqual(1, 1) | ||
}) | ||
|
||
test('asynchronous passing test', async t => { | ||
// This test passes because the Promise returned by the async | ||
// function is not rejected. | ||
assert.strictEqual(1, 1) | ||
}) | ||
|
||
test('callback passing test', (t, done) => { | ||
// done() is the callback function. When the setImmediate() runs, it invokes | ||
// done() with no arguments. | ||
setImmediate(done) | ||
}) |