Skip to content

Commit

Permalink
Stop installing govuk-prototype-kit globally in tests
Browse files Browse the repository at this point in the history
We don't want to accidentally end up with development code installed in
system Node installation after running tests.
  • Loading branch information
lfdebrux committed Sep 29, 2022
1 parent 2891dea commit 9d0fabf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions __tests__/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,9 @@ async function mkPrototype (prototypePath, {
// Create test starter project folder
await fs.mkdirp(prototypePath)

// Generate starter project and start
// Generate starter project
await exec(
'npm i -g'
)

// Generate starter project and start
await exec(
'govuk-prototype-kit create --version local',
`${process.execPath} ${repoDir}/bin/cli create --version local`,
{ cwd: prototypePath, env: { ...process.env, env: 'test' } }
)

Expand Down

0 comments on commit 9d0fabf

Please sign in to comment.