Skip to content

Commit

Permalink
Testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 20, 2022
1 parent 6fc1a9a commit 3da95d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions __tests__/spec/sanity-checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const createKitTimeout = parseInt(process.env.CREATE_KIT_TIMEOUT || '90000', 10)
*/
describe('The Prototype Kit', () => {
beforeAll(async () => {
await exec('git config --global user.email "you@example.com" && git config --global user.name "Your Name"')
await mkPrototype(tmpDir, { allowTracking: false, overwrite: true })
app = require(path.join(tmpDir, 'node_modules', 'govuk-prototype-kit', 'server.js'))

Expand Down
7 changes: 6 additions & 1 deletion bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ async function updatePackageJson (packageJsonPath) {
}

async function initialiseGitRepo () {
return exec('git init && git add -A . && git commit -am "Created prototype kit."')
try {
return exec('git init && git add -A . && git commit -am "Created prototype kit."')
} catch (e) {
console.log('error initialising git repo')
console.log(e.message)
}
}

function usage () {
Expand Down

0 comments on commit 3da95d8

Please sign in to comment.