Skip to content

Commit 37a665d

Browse files
Jake ChampionJakeChampion
authored andcommitted
remove duplicate assertthrows function
1 parent eac769e commit 37a665d

File tree

1 file changed

+0
-19
lines changed
  • integration-tests/js-compute/fixtures/request-cache-key/bin

1 file changed

+0
-19
lines changed

integration-tests/js-compute/fixtures/request-cache-key/bin/index.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -138,25 +138,6 @@ function assertThrows(func, errorClass, errorMessage) {
138138
}
139139
}
140140

141-
function assertThrows(func, errorClass, errorMessage) {
142-
try {
143-
func()
144-
return fail(`Expected \`${func.toString()}\` to throw - Found it did not throw`)
145-
} catch (error) {
146-
if (errorClass) {
147-
if ((error instanceof errorClass) === false) {
148-
return fail(`Expected \`${func.toString()}\` to throw instance of \`${errorClass.name}\` - Found instance of \`${error.name}\``)
149-
}
150-
}
151-
152-
if (errorMessage) {
153-
if (error.message !== errorMessage) {
154-
return fail(`Expected \`${func.toString()}\` to throw error message of \`${errorMessage}\` - Found \`${error.message}\``)
155-
}
156-
}
157-
}
158-
}
159-
160141
// eslint-disable-next-line no-unused-vars
161142
function assertDoesNotThrow(func) {
162143
try {

0 commit comments

Comments
 (0)