Skip to content

Commit

Permalink
Remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Apr 22, 2024
1 parent c195239 commit a61414c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions test/mini_racer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1001,16 +1001,12 @@ def test_promise

def test_webassembly
skip "TruffleRuby does not enable WebAssembly by default" if RUBY_ENGINE == "truffleruby"
log = File.open('testlog2', 'wb')
context = MiniRacer::Context.new()
context.eval("let instance = null;")
filename = File.expand_path("../support/add.wasm", __FILE__)
context.attach("loadwasm", proc {|f| File.read(filename).each_byte.to_a})
context.attach("print", proc {|f| puts f})

log << 'a'
log.flush

context.eval <<~JS
WebAssembly
.instantiate(new Uint8Array(loadwasm()), {
Expand All @@ -1023,22 +1019,12 @@ def test_webassembly
.then(i => { instance = i["instance"];})
.catch(e => print(e.toString()));
JS
log << 'b'
log.flush

while !context.eval("instance") do
log << 'c'
log.flush
context.isolate.pump_message_loop
log << 'd'
log.flush
end
log << 'e'
log.flush

assert_equal(3, context.eval("instance.exports.add(1,2)"))
ensure
log.close
end

class ReproError < StandardError
Expand Down

0 comments on commit a61414c

Please sign in to comment.