-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: change let to const Co-authored-by: Thakur Karthik <[email protected]>
- Loading branch information
1 parent
ea6bd13
commit f83663a
Showing
5 changed files
with
26 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
import { run } from '../../jest/helpers'; | ||
import envinfo from 'envinfo'; | ||
|
||
test('mevn info', async () => { | ||
const { stdout } = await run(['info']); | ||
const data = await envinfo | ||
.run({ | ||
System: ['OS', 'CPU'], | ||
Binaries: ['Node', 'Yarn', 'npm'], | ||
Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'], | ||
npmGlobalPackages: ['mevn-cli'], | ||
}); | ||
expect(stdout).toContain(data); | ||
}); |
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,13 @@ | ||
'use strict'; | ||
|
||
import 'babel-polyfill'; | ||
import execa from 'execa'; | ||
import path from 'path'; | ||
|
||
const CLI_PATH = path.resolve(process.cwd(), 'bin', 'mevn.js'); | ||
|
||
// sync version | ||
export const run = args => execa.sync(CLI_PATH, args); | ||
|
||
// async version | ||
export const runAsync = async args => await execa(CLI_PATH, args); |
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