Skip to content

Commit 49f44f5

Browse files
committed
[test] clearer descriptions
1 parent 04900d9 commit 49f44f5

File tree

1 file changed

+4
-2
lines changed
  • packages/react-native-web/src/exports/Image/__tests__

1 file changed

+4
-2
lines changed

packages/react-native-web/src/exports/Image/__tests__/index-test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ describe('components/Image', () => {
173173
expect(onLoadEndStub.mock.calls.length).toBe(2);
174174
});
175175

176-
test('is called on update if "headers" are different', () => {
176+
test('is called on update if "headers" are modified', () => {
177177
const onLoadStartStub = jest.fn();
178178
const onLoadStub = jest.fn();
179179
const onLoadEndStub = jest.fn();
@@ -257,7 +257,9 @@ describe('components/Image', () => {
257257
expect(onLoadEndStub.mock.calls.length).toBe(1);
258258
});
259259

260-
test('is not called on update if "headers" and "uri" the same', () => {
260+
// This test verifies that wen source is declared in-line and the parent component
261+
// re-renders we aren't restarting the load process because the source is structurally equal
262+
test('is not called on update when "headers" and "uri" are not modified', () => {
261263
const onLoadStartStub = jest.fn();
262264
const onLoadStub = jest.fn();
263265
const onLoadEndStub = jest.fn();

0 commit comments

Comments
 (0)