Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Commit

Permalink
improve wording for error message on unknown assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman committed Dec 24, 2018
1 parent 38b94e7 commit c5efc14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = (config, stats) => {
return leven(a, configName) - leven(b, configName)
})
test.fail(
`Could not assert ${configName}. Is your config correct? Did you mean '${proposedMetric}'`
`Could not assert '${configName}'. Did you mean '${proposedMetric}'?`
)
test.end()
return false
Expand Down
6 changes: 5 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ test('it fails when an unknown config option is used', async t => {
t.is(error.code, 1)
t.true(error.stdout.includes('not ok'))
t.false(error.stdout.includes('✔'))
t.true(error.stdout.includes('Is your config correct?'))
t.true(
error.stdout.includes(
`Could not assert 'stylesheet.size'. Did you mean 'stylesheets.size'?`
)
)
}
})

0 comments on commit c5efc14

Please sign in to comment.