-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(package): update dependencies and fix related issues
- Loading branch information
1 parent
cfdfd04
commit c46ce4e
Showing
5 changed files
with
2,603 additions
and
19 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,40 @@ | ||
'use strict' | ||
|
||
/* | ||
* adonis-framework | ||
* | ||
* (c) Harminder Virk <virk@adonisjs.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
const semver = require('semver') | ||
const { spawn } = require('child_process') | ||
const spawnArgs = [] | ||
|
||
if (semver.lt(process.version, '8.0.0')) { | ||
spawnArgs.push('--harmony-async-await') | ||
} | ||
|
||
function local () { | ||
spawnArgs.push('./node_modules/.bin/japa') | ||
const tests = spawn('node', spawnArgs) | ||
tests.stdout.on('data', (data) => process.stdout.write(data)) | ||
tests.stderr.on('data', (data) => process.stderr.write(data)) | ||
tests.on('close', (code) => process.exit(code)) | ||
} | ||
|
||
function win () { | ||
spawnArgs.push('./node_modules/japa-cli/index.js') | ||
const tests = spawn('node', spawnArgs) | ||
tests.stdout.on('data', (data) => process.stdout.write(data)) | ||
tests.stderr.on('data', (data) => process.stderr.write(data)) | ||
tests.on('close', (code) => process.exit(code)) | ||
} | ||
|
||
if (process.argv.indexOf('--local') > -1) { | ||
local() | ||
} else if (process.argv.indexOf('--win') > -1) { | ||
win() | ||
} |
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,5 @@ | ||
'use strict' | ||
|
||
const cli = require('japa/cli') | ||
cli.run('test/**/*.spec.js') | ||
cli.filter('test/**/*.async.spec.js') |
Oops, something went wrong.