This repository has been archived by the owner on Dec 12, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23dfea5
commit f29bca6
Showing
8 changed files
with
86 additions
and
3 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,33 @@ | ||
import path from 'path' | ||
import fs from 'fs' | ||
import test from 'ava' | ||
import check from '../util/check' | ||
import PATH from '../util/path' | ||
|
||
test('check registry', t => { | ||
const result = check.registry('abc') | ||
|
||
t.is(result, '--registry=abc') | ||
}) | ||
|
||
test('check registry error', t => { | ||
const result = check.registry() | ||
|
||
t.is(result, '') | ||
}) | ||
|
||
test('check init package', t => { | ||
check.initPluginPackage() | ||
|
||
t.true(fs.existsSync(path.join(PATH.PLUGIN_PATH, 'package.json'))) | ||
}) | ||
|
||
test('check pluginExists', t => { | ||
t.notThrows(function () { | ||
check.pluginExists('vue') | ||
}) | ||
}) | ||
|
||
test('check version', t => { | ||
t.notThrows(check.checkVersion) | ||
}) |
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,15 @@ | ||
import test from 'ava' | ||
import exec from '../util/exec' | ||
|
||
test('exec', t => { | ||
t.notThrows(function () { | ||
exec('echo', ['hello world']) | ||
}) | ||
|
||
t.notThrows(function () { | ||
exec('echo', ['hello world'], { | ||
stdio: 'inherit', | ||
errMessage: 'error' | ||
}) | ||
}) | ||
}) |
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