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

Commit

Permalink
codemod jasmine -> jest in html/shared
Browse files Browse the repository at this point in the history
Summary: replace `spyOn` with `jest.spyOn`

Reviewed By: captbaritone

Differential Revision: D8211248

fbshipit-source-id: 7f23ae117c5cc8176bc4ff9f064ea65b03ffb62c
  • Loading branch information
aaronabramov authored and facebook-github-bot committed Jul 9, 2018
1 parent 47ae65a commit 7f9299d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/component/contents/__tests__/DraftEditorTextNode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ test('must skip updates if text already matches DOM, non-IE', function() {
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
);

spyOn(stub, 'render').and.callThrough();
jest.spyOn(stub, 'render');

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

expect(stub.render.calls.count()).toBe(0);
expect(stub.render.mock.calls.length).toBe(0);

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

expect(stub.render.calls.count()).toBe(1);
expect(stub.render.mock.calls.length).toBe(1);
});

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

spyOn(stub, 'render').and.callThrough();
jest.spyOn(stub, 'render');

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

expect(stub.render.calls.count()).toBe(0);
expect(stub.render.mock.calls.length).toBe(0);

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

expect(stub.render.calls.count()).toBe(1);
expect(stub.render.mock.calls.length).toBe(1);
});

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

0 comments on commit 7f9299d

Please sign in to comment.