Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 10347fe

Browse files
committed
[ElementSpec] fix warning format matching
1 parent 4b8d04d commit 10347fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/react/element_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def render
8787
}
8888
expect(React.render_to_static_markup(React.create_element(Foo).on(:event) {'works!'})).to eq('<span>works!</span>')
8989
`window.console.warn = org_warn_console; window.console.error = org_error_console;`
90-
expect(`log`).to eq(["Warning: Failed propType: In component `Foo`\nProvided prop `on_event` not specified in spec", "Warning: Deprecated feature used in React::Component. In future releases React::Element#on('event') will no longer respond to the '_onEvent' emitter.\nRename your emitter param to 'on_event' or use .on('<_onEvent>')"])
90+
expect(`log[0]`).to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `on_event` not specified in spec/)
91+
expect(`log[1]`).to eq("Warning: Deprecated feature used in React::Component. In future releases React::Element#on('event') will no longer respond to the '_onEvent' emitter.\nRename your emitter param to 'on_event' or use .on('<_onEvent>')")
9192
end
9293
end
9394

0 commit comments

Comments
 (0)