-
-
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: update deps and fix problems (#83)
closes #52
- Loading branch information
1 parent
0ab9077
commit 89ab6c9
Showing
6 changed files
with
1,625 additions
and
1,841 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,87 @@ | ||
'use strict'; | ||
|
||
const test = require('ava'); | ||
const m = require('.'); | ||
const { test } = require('uvu'); | ||
const assert = require('uvu/assert'); | ||
const execa = require('execa'); | ||
|
||
test('title', (t) => { | ||
t.is(m('unicorns'), 'unicorns & rainbows'); | ||
test('mocha', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.mocha.js']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('3 passing'), 'process stdout'); | ||
}); | ||
|
||
test('mocha with DEBUG=app', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.mocha.js'], { env: { DEBUG: 'app' } }); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('3 passing'), 'process stdout'); | ||
assert.ok(proc.stdout.includes('app test pass'), 'debug output'); | ||
}); | ||
|
||
test('mocha incognito', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.mocha.js', '--incognito']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('3 passing'), 'process stdout'); | ||
}); | ||
|
||
test('mocha mode:worker', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.mocha.js', '--mode', 'worker']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('3 passing'), 'process stdout'); | ||
}); | ||
|
||
test('mocha extension', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.mocha.js', '--extension']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('3 passing'), 'process stdout'); | ||
}); | ||
|
||
test('tape', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.tape.js', '--runner', 'tape']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('# pass 2'), 'process stdout'); | ||
}); | ||
|
||
test('tape mode:worker', async () => { | ||
const proc = await execa('./cli.js', ['mocks/test.tape.js', '--runner', 'tape', '--mode', 'worker']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('# pass 2'), 'process stdout'); | ||
}); | ||
|
||
test('zora', async () => { | ||
const proc = await execa('./cli.js', ['mocks/*.zora.js', '--runner', 'zora'], { | ||
env: { | ||
'RUN_ONLY': true, | ||
'INDENT': true | ||
} | ||
}); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('# success: 2'), 'process stdout'); | ||
}); | ||
|
||
test('zora mode:worker', async () => { | ||
const proc = await execa('./cli.js', ['mocks/*.zora.js', '--runner', 'zora', '--mode', 'worker'], { | ||
env: { | ||
'RUN_ONLY': true, | ||
'INDENT': true | ||
} | ||
}); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('# success: 2'), 'process stdout'); | ||
}); | ||
|
||
test.skip('benchmark', async () => { | ||
const proc = await execa('./cli.js', ['mocks/benchmark.js', '--runner', 'benchmark']); | ||
|
||
assert.is(proc.exitCode, 0, 'exit code'); | ||
assert.ok(proc.stdout.includes('Fastest is String#indexOf'), 'process stdout'); | ||
}); | ||
test.run(); |
Oops, something went wrong.