Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 7f9299d

Browse files
boujeepossumfacebook-github-bot
authored andcommitted
codemod jasmine -> jest in html/shared
Summary: replace `spyOn` with `jest.spyOn` Reviewed By: captbaritone Differential Revision: D8211248 fbshipit-source-id: 7f23ae117c5cc8176bc4ff9f064ea65b03ffb62c
1 parent 47ae65a commit 7f9299d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/component/contents/__tests__/DraftEditorTextNode-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,16 @@ test('must skip updates if text already matches DOM, non-IE', function() {
139139
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
140140
);
141141

142-
spyOn(stub, 'render').and.callThrough();
142+
jest.spyOn(stub, 'render');
143143

144144
renderIntoContainer(<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>);
145145

146-
expect(stub.render.calls.count()).toBe(0);
146+
expect(stub.render.mock.calls.length).toBe(0);
147147

148148
// Sanity check that updating is performed when appropriate.
149149
renderIntoContainer(<DraftEditorTextNode>{TEST_B}</DraftEditorTextNode>);
150150

151-
expect(stub.render.calls.count()).toBe(1);
151+
expect(stub.render.mock.calls.length).toBe(1);
152152
});
153153

154154
test('must skip updates if text already matches DOM, IE', function() {
@@ -157,16 +157,16 @@ test('must skip updates if text already matches DOM, IE', function() {
157157
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
158158
);
159159

160-
spyOn(stub, 'render').and.callThrough();
160+
jest.spyOn(stub, 'render');
161161

162162
renderIntoContainer(<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>);
163163

164-
expect(stub.render.calls.count()).toBe(0);
164+
expect(stub.render.mock.calls.length).toBe(0);
165165

166166
// Sanity check that updating is performed when appropriate.
167167
renderIntoContainer(<DraftEditorTextNode>{TEST_B}</DraftEditorTextNode>);
168168

169-
expect(stub.render.calls.count()).toBe(1);
169+
expect(stub.render.mock.calls.length).toBe(1);
170170
});
171171

172172
test('must update from non-empty to empty, non-IE', function() {

0 commit comments

Comments
 (0)