Skip to content

Commit 23e33f0

Browse files
committed
Lint
1 parent 05d2f6a commit 23e33f0

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

test/async_test.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ def test_nested_sync_eval_does_not_consume_timeout
211211
end
212212
)
213213

214+
source = <<~JS
215+
runSlowEval();
216+
(() => {
217+
const start = Date.now();
218+
while (Date.now() - start < 500) {}
219+
})();
220+
JS
221+
214222
assert_raises(MiniRacer::ScriptTerminatedError) do
215-
Timeout.timeout(2) do
216-
context.eval(<<~JS)
217-
runSlowEval();
218-
(() => {
219-
const start = Date.now();
220-
while (Date.now() - start < 500) {}
221-
})();
222-
JS
223-
end
223+
Timeout.timeout(2) { context.eval(source) }
224224
end
225225
assert nested_terminated
226226
assert_equal 2, context.eval("1 + 1")

0 commit comments

Comments
 (0)