update to support dots as usual
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { expect, tap } from 'tapbundle'
|
||||
|
||||
import * as smartinteract from '../dist/index'
|
||||
import * as smartinteract from '../ts/index'
|
||||
|
||||
let testInteract: smartinteract.SmartInteract
|
||||
|
||||
@@ -22,12 +22,19 @@ tap.test('should add question to SmartInteract instance', async () => {
|
||||
message: 'what is your second favourite color? Answer is red',
|
||||
default: 'red'
|
||||
}])
|
||||
testInteract.addQuestions([ {
|
||||
name: 'some.dotted.name',
|
||||
type: 'input',
|
||||
message: 'what is your second favourite color? Answer is red',
|
||||
default: 'aValidAnswer'
|
||||
}])
|
||||
})
|
||||
|
||||
tap.test('should use default value when not in CI', async () => {
|
||||
let answerBucket = await testInteract.runQueue()
|
||||
expect(answerBucket.getAnswerFor('testQuestion1')).to.equal('blue')
|
||||
expect(answerBucket.getAnswerFor('testQuestion2')).to.equal('red')
|
||||
expect(answerBucket.getAnswerFor('some.dotted.name')).to.equal('aValidAnswer')
|
||||
})
|
||||
|
||||
tap.start()
|
||||
|
Reference in New Issue
Block a user