@samitouri / QOS-React / commits / 5c509b150d

Update Jasmine 2 PR with changes from master

Dan Abramov committed May 25, 2016 at 21:55 UTC 5c509b150d8c793558ef043e887eb1f163261025
4 files changed +11 -11
src/addons/transitions/__tests__/ReactTransitionGroup-test.js
+3 -3
@@ -286,14 +286,14 @@ describe('ReactTransitionGroup', function() {
286
287 ReactDOM.render(<Component />, container);
288
289 - expect(console.error.argsForCall.length).toBe(2);
290 - expect(console.error.argsForCall[0][0]).toBe(
289 + expect(console.error.calls.count()).toBe(2);
290 + expect(console.error.calls.argsFor(0)[0]).toBe(
291 'Warning: flattenChildren(...): ' +
292 'Encountered two children with the same key, `1`. ' +
293 'Child keys must be unique; when two children share a key, ' +
294 'only the first child will be used.'
295 );
296 - expect(normalizeCodeLocInfo(console.error.argsForCall[1][0])).toBe(
296 + expect(normalizeCodeLocInfo(console.error.calls.argsFor(1)[0])).toBe(
297 'Warning: flattenChildren(...): ' +
298 'Encountered two children with the same key, `1`. ' +
299 'Child keys must be unique; when two children share a key, ' +
src/renderers/shared/stack/reconciler/__tests__/ReactChildReconciler-test.js
+4 -4
@@ -40,8 +40,8 @@ describe('ReactChildReconciler', function() {
40
41 ReactTestUtils.renderIntoDocument(<Component />);
42
43 - expect(console.error.argsForCall.length).toBe(1);
44 - expect(console.error.argsForCall[0][0]).toContain(
43 + expect(console.error.calls.count()).toBe(1);
44 + expect(console.error.calls.argsFor(0)[0]).toContain(
45 'Child keys must be unique; when two children share a key, only the first child will be used.'
46 );
47 });
@@ -69,8 +69,8 @@ describe('ReactChildReconciler', function() {
69
70 ReactTestUtils.renderIntoDocument(<GrandParent />);
71
72 - expect(console.error.argsForCall.length).toBe(1);
73 - expect(normalizeCodeLocInfo(console.error.argsForCall[0][0])).toBe(
72 + expect(console.error.calls.count()).toBe(1);
73 + expect(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe(
74 'Warning: flattenChildren(...): ' +
75 'Encountered two children with the same key, `1`. ' +
76 'Child keys must be unique; when two children share a key, ' +
src/renderers/shared/stack/reconciler/__tests__/ReactMultiChild-test.js
+2 -2
@@ -185,8 +185,8 @@ describe('ReactMultiChild', function() {
185 container
186 );
187
188 - expect(console.error.argsForCall.length).toBe(1);
189 - expect(normalizeCodeLocInfo(console.error.argsForCall[0][0])).toBe(
188 + expect(console.error.calls.count()).toBe(1);
189 + expect(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe(
190 'Warning: flattenChildren(...): ' +
191 'Encountered two children with the same key, `1`. ' +
192 'Child keys must be unique; when two children share a key, ' +
src/test/__tests__/ReactTestUtils-test.js
+2 -2
@@ -288,9 +288,9 @@ describe('ReactTestUtils', function() {
288
289 var shallowRenderer = ReactTestUtils.createRenderer();
290 shallowRenderer.render(<SimpleComponent />);
291 - expect(console.error.argsForCall.length).toBe(1);
291 + expect(console.error.calls.count()).toBe(1);
292 expect(
293 - console.error.argsForCall[0][0].replace(/\(at .+?:\d+\)/g, '(at **)')
293 + console.error.calls.argsFor(0)[0].replace(/\(at .+?:\d+\)/g, '(at **)')
294 ).toBe(
295 'Warning: Failed context type: Required context `name` was not ' +
296 'specified in `SimpleComponent`.\n' +