-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: more colors and experiental runner and autodetect
- Loading branch information
1 parent
1dc59f4
commit 477ec99
Showing
11 changed files
with
708 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import('./test1.test.js') | ||
import('./test2.test.js') |
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,69 @@ | ||
import { test } from '../../src/taps/index.js' | ||
import delay from 'delay' | ||
import { type, is, equal } from 'uvu/assert' | ||
import assert from 'assert' | ||
// test.before(() => { | ||
// console.log('before') | ||
// }) | ||
|
||
// test.after(() => { | ||
// console.log('after') | ||
// }) | ||
|
||
// test.beforeEach(() => { | ||
// console.log('before each') | ||
// }) | ||
|
||
// test.afterEach(() => { | ||
// console.log('after each') | ||
// throw new Error('after each error') | ||
// }) | ||
|
||
test('sum1', () => { | ||
type(() => {}, 'function') | ||
is(3, 3) | ||
}) | ||
|
||
test.skip('sum2', async () => { | ||
await delay(100) | ||
type(() => {}, 'function') | ||
is(3, 3) | ||
}) | ||
|
||
// test('fail sum', () => { | ||
// type(() => {}, 'function') | ||
// is(3, 4) | ||
// }) | ||
|
||
// test('fail sum 2', () => { | ||
// type(() => {}, 'functions') | ||
// is(3, 4) | ||
// }) | ||
|
||
// test('fail sum 3', () => { | ||
// equal({ a: 1, b: 2 }, { a: 2 }) | ||
// }) | ||
|
||
test('fail sum 4', () => { | ||
assert.deepStrictEqual({ a: 1, b: 2 }, { a: 2 }) | ||
}) | ||
|
||
// test('failing test using Promises', () => { | ||
// // Promises can be used directly as well. | ||
// return new Promise((resolve, reject) => { | ||
// setImmediate(() => { | ||
// reject(new Error('this will cause the test to fail')) | ||
// }) | ||
// }) | ||
// }) | ||
|
||
test('fail sum 45', (t) => { | ||
t.test('sum2', async () => { | ||
await delay(100) | ||
type(() => {}, 'function') | ||
is(3, 3) | ||
}) | ||
t.test('fail sum 36', (t) => { | ||
t.subset({ a: 1, b: 2 }, { b: 100000000000000, a: (v) => v === 3 }) | ||
}) | ||
}) |
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,11 @@ | ||
import { suite } from '../../src/taps/index.js' | ||
import { type, is } from 'uvu/assert' | ||
|
||
const test = suite('suite1') | ||
|
||
test('sum suite 1', () => { | ||
type(() => {}, 'function') | ||
is(3, 3) | ||
}) | ||
|
||
// suite1.run() |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.