-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Franck
committed
Jun 12, 2019
1 parent
772d536
commit 6850244
Showing
13 changed files
with
122 additions
and
17 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
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,6 @@ | ||
module.exports = () => ({ | ||
type: 'input', | ||
message: 'π¦ Install command (use empty value to skip)', | ||
name: 'installCommand', | ||
default: 'npm install' | ||
}) |
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,14 @@ | ||
const askInstallCommand = require('./install-command') | ||
|
||
describe('askInstallCommand', () => { | ||
it('should return correct question format', () => { | ||
const result = askInstallCommand() | ||
|
||
expect(result).toEqual({ | ||
type: 'input', | ||
message: 'π¦ Install command (use empty value to skip)', | ||
name: 'installCommand', | ||
default: 'npm install' | ||
}) | ||
}) | ||
}) |
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,6 @@ | ||
module.exports = projectInfos => ({ | ||
type: 'input', | ||
message: 'β Test command (use empty value to skip)', | ||
name: 'testCommand', | ||
default: projectInfos.testCommand | ||
}) |
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,17 @@ | ||
const askTestCommand = require('./test-command') | ||
|
||
describe('askTestCommand', () => { | ||
it('should return correct question format', () => { | ||
const testCommand = 'npm run test' | ||
const projectInfos = { testCommand } | ||
|
||
const result = askTestCommand(projectInfos) | ||
|
||
expect(result).toEqual({ | ||
type: 'input', | ||
message: 'β Test command (use empty value to skip)', | ||
name: 'testCommand', | ||
default: testCommand | ||
}) | ||
}) | ||
}) |
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,6 @@ | ||
module.exports = projectInfos => ({ | ||
type: 'input', | ||
message: 'π Usage command or instruction (use empty value to skip)', | ||
name: 'usage', | ||
default: projectInfos.usage | ||
}) |
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,17 @@ | ||
const askUsage = require('./usage') | ||
|
||
describe('askUsage', () => { | ||
it('should return correct question format', () => { | ||
const usage = 'npm start' | ||
const projectInfos = { usage } | ||
|
||
const result = askUsage(projectInfos) | ||
|
||
expect(result).toEqual({ | ||
type: 'input', | ||
message: 'π Usage command or instruction (use empty value to skip)', | ||
name: 'usage', | ||
default: usage | ||
}) | ||
}) | ||
}) |
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