We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c0233b commit 49879b0Copy full SHA for 49879b0
test/index.js
@@ -90,18 +90,22 @@ describe('render-to-string', () => {
90
91
let rendered = render(<Test foo="test">content</Test>);
92
93
+ const PROPS = {
94
+ foo: 'test',
95
+ children: ['content']
96
+ };
97
+
98
expect(rendered)
99
.to.equal(`<div foo="test">content</div>`);
100
- expect(Test).to.have.been.calledOnce;
101
+ expect(Test)
102
+ .to.have.been.calledOnce
103
+ .and.calledWith(match(PROPS));
104
105
expect(Test.prototype.render)
106
.to.have.been.calledOnce
107
.and.calledWithExactly(
- match({
- foo: 'test',
- children: ['content']
- }),
108
+ match(PROPS),
109
match({}) // empty state
110
);
111
});
0 commit comments