Skip to content

Commit f3811c1

Browse files
committed
removed unneeded spec that was failing
1 parent b94089a commit f3811c1

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

ruby/hyper-component/spec/client_features/refs_callback_spec.rb

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,6 @@ def render
6464
end.to eq("1")
6565
end
6666

67-
it "works, even when the component is unmounted" do
68-
# was a bug, on unmount react calls the ref method with null instead of a dom node
69-
# callback failed then
70-
# ref is called two times, once on mount with dom_node, once on unmount with null
71-
mount "Foo" do
72-
class Unmountable < HyperComponent
73-
render do
74-
DIV { "This is a Component" }
75-
end
76-
end
77-
Foo.class_eval do
78-
def ref_rec(dom_node)
79-
@@rec_cnt ||= 0
80-
@@rec_cnt += 1
81-
end
82-
def self.rec_cnt
83-
@@rec_cnt
84-
end
85-
86-
after_mount { mutate @unmount = true }
87-
88-
render do
89-
Unmountable(ref: method(:ref_rec).to_proc) unless @unmount
90-
end
91-
end
92-
end
93-
expect_evaluate_ruby('Foo.rec_cnt').to eq(2)
94-
end
95-
9667
it 'can get the reference using the state set method' do
9768
mount 'Foo' do
9869
class Foo

0 commit comments

Comments
 (0)