Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test case for input license
  • Loading branch information
watilde committed Apr 11, 2016
commit b278235bebf67a963e943f6f4ec6bbc2e5beb68c
15 changes: 13 additions & 2 deletions test/e2e/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ describe('vue-cli', () => {
less: true,
sass: true
},
pick: 'no'
pick: 'no',
license: 'MIT'
}

it('template generation', done => {
Expand Down Expand Up @@ -90,7 +91,7 @@ describe('vue-cli', () => {
})
})

it('validate input value', done => {
it('validate invalid name', done => {
// deep copy
var invalidName = extend({}, answers, {name: 'INVALID-NAME'})
monkeyPatchInquirer(invalidName)
Expand All @@ -99,4 +100,14 @@ describe('vue-cli', () => {
done()
})
})

it('validate invalid lisence', done => {
// deep copy
var invalidLicense = extend({}, answers, {license: 'INVALID-LICENSE'})
monkeyPatchInquirer(invalidLicense)
generate('INVALID-LICENSE', MOCK_TEMPLATE_REPO_PATH, MOCK_TEMPLATE_BUILD_PATH, err => {
expect(err).to.be.an('error');
done()
})
})
})