Skip to content

Commit

Permalink
simplify regex in unit tests (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Aug 23, 2022
1 parent aa90d51 commit efb7ccc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/print-routes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('should warn on file not found', t => {
const oldStop = printRoutes.stop
t.teardown(() => { printRoutes.stop = oldStop })
printRoutes.stop = function (message) {
t.ok(/.*not-found.js doesn't exist within/.test(message), message)
t.ok(/not-found.js doesn't exist within/.test(message), message)
}

const argv = ['./data/not-found.js']
Expand Down
2 changes: 1 addition & 1 deletion test/start.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ test('should warn on file not found', t => {
const oldStop = start.stop
t.teardown(() => { start.stop = oldStop })
start.stop = function (message) {
t.ok(/.*not-found.js doesn't exist within/.test(message), message)
t.ok(/not-found.js doesn't exist within/.test(message), message)
}

const argv = ['-p', getPort(), './data/not-found.js']
Expand Down

0 comments on commit efb7ccc

Please sign in to comment.