summaryrefslogtreecommitdiff
path: root/benchmark/assert/throws.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/assert/throws.js')
-rw-r--r--benchmark/assert/throws.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/benchmark/assert/throws.js b/benchmark/assert/throws.js
index 3a6326371d..c80518377a 100644
--- a/benchmark/assert/throws.js
+++ b/benchmark/assert/throws.js
@@ -13,28 +13,27 @@ function main({ n, method }) {
const doNotThrowError = () => { return 'foobar'; };
const regExp = /foobar/;
const message = 'failure';
- var i;
switch (method) {
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'doesNotThrow':
bench.start();
- for (i = 0; i < n; ++i) {
+ for (let i = 0; i < n; ++i) {
doesNotThrow(doNotThrowError);
}
bench.end(n);
break;
case 'throws_TypeError':
bench.start();
- for (i = 0; i < n; ++i) {
+ for (let i = 0; i < n; ++i) {
throws(throwError, TypeError, message);
}
bench.end(n);
break;
case 'throws_RegExp':
bench.start();
- for (i = 0; i < n; ++i) {
+ for (let i = 0; i < n; ++i) {
throws(throwError, regExp, message);
}
bench.end(n);