-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export test function if we don't define the suite
- Loading branch information
Showing
6 changed files
with
61 additions
and
60 deletions.
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
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
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 |
---|---|---|
@@ -1,51 +1,50 @@ | ||
import {suite} from '#suite' | ||
const test = suite(import.meta) | ||
|
||
suite(import.meta, test => { | ||
test('truthy', () => { | ||
test.ok(true) | ||
}) | ||
|
||
test('falsy', () => { | ||
test.not.ok(false) | ||
}) | ||
test('truthy', () => { | ||
test.ok(true) | ||
}) | ||
|
||
test('equal', () => { | ||
test.equal({a: 1}, {a: 1}) | ||
}) | ||
test('falsy', () => { | ||
test.not.ok(false) | ||
}) | ||
|
||
test('not equal', () => { | ||
test.not.equal({a: 1}, {a: 2}) | ||
}) | ||
test('equal', () => { | ||
test.equal({a: 1}, {a: 1}) | ||
}) | ||
|
||
test('strict equal', () => { | ||
test.is(1, 1) | ||
}) | ||
test('not equal', () => { | ||
test.not.equal({a: 1}, {a: 2}) | ||
}) | ||
|
||
test('not strict equal', () => { | ||
test.not.is(1, '1') | ||
}) | ||
test('strict equal', () => { | ||
test.is(1, 1) | ||
}) | ||
|
||
test('throws', () => { | ||
test.throws(() => { | ||
throw new Error('ok') | ||
}) | ||
}) | ||
test('not strict equal', () => { | ||
test.not.is(1, '1') | ||
}) | ||
|
||
test('throws message', () => { | ||
test.throws(() => { | ||
throw new Error('a message') | ||
}, 'message') | ||
test('throws', () => { | ||
test.throws(() => { | ||
throw new Error('ok') | ||
}) | ||
}) | ||
|
||
test.skip('skip', () => { | ||
test.ok(false) | ||
}) | ||
test('throws message', () => { | ||
test.throws(() => { | ||
throw new Error('a message') | ||
}, 'message') | ||
}) | ||
|
||
test('async', async () => { | ||
test.ok(true) | ||
}) | ||
test.skip('skip', () => { | ||
test.ok(false) | ||
}) | ||
|
||
/*test.only('only', () => { | ||
test.ok(true) | ||
})*/ | ||
test('async', async () => { | ||
test.ok(true) | ||
}) | ||
|
||
/*test.only('only', () => { | ||
test.ok(true) | ||
})*/ |