Skip to content

Commit 4184b84

Browse files
method_missing with block is already tested in unit/test_object.rb
1 parent 231168a commit 4184b84

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

packages/npm-packages/ruby-wasm-wasi/test/js_from_rb.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,6 @@ describe("Manipulation of JS from Ruby", () => {
1010
expect(result.toString()).toBe("true");
1111
});
1212

13-
test("JS::Object#method_missing with block", async () => {
14-
const vm = await initRubyVM();
15-
const proc = vm.eval(`
16-
require "js"
17-
proc do |obj|
18-
obj.take_block "x" do |y|
19-
$y = y
20-
end
21-
end
22-
`);
23-
const takeBlock = jest.fn((arg1: string, block: (_: any) => void) => {
24-
expect(arg1).toBe("x");
25-
block("y");
26-
});
27-
proc.call("call", vm.wrap({ take_block: takeBlock }));
28-
expect(takeBlock).toBeCalled();
29-
const y = vm.eval(`$y`);
30-
expect(y.toString()).toBe("y");
31-
});
32-
3313
test.each([
3414
{ expr: "JS.global[:Object]", result: Object },
3515
{ expr: "JS.global[:Object][:keys]", result: Object.keys },

0 commit comments

Comments
 (0)