Skip to content

Commit

Permalink
unskip tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSurgisonGDS committed Oct 27, 2023
1 parent 0dcbc57 commit 9da8dbd
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions lib/plugins/plugin-validator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ describe('plugin-validator', () => {
testScope.fileSystem.writeFile(['govuk-prototype-kit.config.json'], JSON.stringify({
myExample: ['abc']
}))
await validatePlugin(testScope.mockFileSystemRoot).finally(
() => {
expect(testScope.errLogs).toEqual([ansiColors.red('Error: The following invalid keys exist in your config: myExample')])
expect(testScope.stdLogs).toEqual(phaseOneSuccessMessages)
}
)
await validatePlugin(testScope.mockFileSystemRoot)
expect(testScope.errLogs).toEqual([ansiColors.red('Error: The following invalid keys exist in your config: myExample')])
expect(testScope.stdLogs).toEqual(phaseOneSuccessMessages)
process.exitCode = 0
})
it('should allow a single unknown key when specified', async () => {
testScope.fileSystem.writeFile(['govuk-prototype-kit.config.json'], JSON.stringify({
Expand All @@ -62,11 +60,9 @@ describe('plugin-validator', () => {
options: {
keysToIgnoreIfUnknown: 'myExample'
}
}).finally(
() => {
expect(testScope.errLogs).toEqual([])
expect(testScope.stdLogs).toEqual(validSuccessMessages)
})
})
expect(testScope.errLogs).toEqual([])
expect(testScope.stdLogs).toEqual(validSuccessMessages)
})
it('should allow multiple unknown keys when specified', async () => {
testScope.fileSystem.writeFile(['govuk-prototype-kit.config.json'], JSON.stringify({
Expand All @@ -78,11 +74,9 @@ describe('plugin-validator', () => {
options: {
keysToIgnoreIfUnknown: 'myExample,anotherExample,third'
}
}).finally(
() => {
expect(testScope.errLogs).toEqual([])
expect(testScope.stdLogs).toEqual(validSuccessMessages)
})
})
expect(testScope.errLogs).toEqual([])
expect(testScope.stdLogs).toEqual(validSuccessMessages)
})
})

Expand Down

0 comments on commit 9da8dbd

Please sign in to comment.