yeoman-assert icon indicating copy to clipboard operation
yeoman-assert copied to clipboard

Overwriting prompts

Open tiagoporto opened this issue 6 years ago • 2 comments

My test files is

describe('Package.json File', function () {
  before(function () {
    return yoTest
      .run(path.join(__dirname, '../../app'))
      .withPrompts({
        integrations: ['coveralls']
      })
      .toPromise()
  })

  it('With coveralls', function () {
    assert.equalsFileContent('package.json', fs.readFileSync(path.resolve(__dirname, 'coveralls.json'), 'utf-8'))
  })
})

describe('Package.json File', function () {
  before(function () {
    return yoTest
      .run(path.join(__dirname, '../../app'))
      .withPrompts({
        integrations: ['travis']
      })
      .toPromise()
  })

  it('With travis', function () {
    assert.equalsFileContent('package.json', fs.readFileSync(path.resolve(__dirname, 'travis.json'), 'utf-8'))
  })
})

On the first test With coveralls run with parameter integrations: ['coveralls'], on the second I change the parameter integrations: ['travis']. The problem is, on the second test the first parameter still there.

Im doing something wrong?

tiagoporto avatar Oct 24 '17 18:10 tiagoporto