acamposruiz / Lobupla-angular

Web application with AngularJS that provide an interface to made searches with google maps API. So you can get the nearest business you need.
1 stars 1 forks source link

test #1

Open acamposruiz opened 7 years ago

acamposruiz commented 7 years ago

Summary

This is a fix for this issue

When running a single test that has many test cases the error messages are printed before the list of failing/passing tests which makes us to scroll up every time just to see the error message.

This Pull Request change the behavior of print error messages to put them after the list of tests

So the behavior is going to switch from the actual:

image

to this:

image

In order to keep the messages consistent, Both the FAIL and PASS messages will be printed after the list of failing/passing tests.

So this:

image

will also switch to:

image

Test plan

acamposruiz commented 7 years ago
getMockImplementation
  ✓ should mock calls to a mock function (24ms)
mockImplementationOnce
  ✓ should mock single call to a mock function (26ms)
  ✓ should fallback to default mock function when no specific mock is available (25ms)
spyOn
  ✓ should work (30ms)
  ✓ should throw on invalid input (25ms)
  ✓ supports restoring all spies (25ms)
stub()
  ✕ encountered a declaration exception (27ms)

FAIL packages/jest-mock/src/tests/jest_mock.test.js ● moduleMocker › stub() › encountered a declaration exception

expect(received).toBe(expected)

Expected value to be (using ===):
  false
Received:
  true

  at Object.it (packages/jest-mock/src/__tests__/jest_mock.test.js:539:20)
acamposruiz commented 7 years ago
  ✓ should work (30ms)
  ✓ should throw on invalid input (25ms)
  ✓ supports restoring all spies (25ms)
stub()
  ✕ encountered a declaration exception (27ms)

FAIL packages/jest-mock/src/tests/jest_mock.test.js ● moduleMocker › stub() › encountered a declaration exception

expect(received).toBe(expected)

Expected value to be (using ===):
  false
Received:
  true

  at Object.it (packages/jest-mock/src/__tests__/jest_mock.test.js:539:20)

Test Suites: 1 failed, 1 total Tests: 1 failed, 37 passed, 38 total Snapshots: 0 total

acamposruiz commented 7 years ago
  ✓ should work (30ms)
  ✓ should throw on invalid input (25ms)
  ✓ supports restoring all spies (25ms)
stub()
  ✕ encountered a declaration exception (27ms)

FAIL packages/jest-mock/src/tests/jest_mock.test.js ● moduleMocker › stub() › encountered a declaration exception

expect(received).toBe(expected)

Expected value to be (using ===):
  false
Received:
  true

  at Object.it (packages/jest-mock/src/__tests__/jest_mock.test.js:539:20)

Test Suites: 1 failed, 1 total Tests: 1 failed, 37 passed, 38 total Snapshots: 0 total

acamposruiz commented 7 years ago
  ✓ should work (30ms)
  ✓ should throw on invalid input (25ms)
  ✓ supports restoring all spies (25ms)
stub()
  ✕ encountered a declaration exception (27ms)

FAIL packages/jest-mock/src/tests/jest_mock.test.js ● moduleMocker › stub() › encountered a declaration exception

expect(received).toBe(expected)

Expected value to be (using ===):
  false
Received:
  true

  at Object.it (packages/jest-mock/src/__tests__/jest_mock.test.js:539:20)

Test Suites: 1 failed, 1 total Tests: 1 failed, 37 passed, 38 total Snapshots: 0 total

acamposruiz commented 7 years ago
  ✓ should work (30ms)
  ✓ should throw on invalid input (25ms)
  ✓ supports restoring all spies (25ms)
stub()
  ✕ encountered a declaration exception (27ms)

FAIL packages/jest-mock/src/tests/jest_mock.test.js ● moduleMocker › stub() › encountered a declaration exception

expect(received).toBe(expected)

Expected value to be (using ===):
  false
Received:
  true

  at Object.it (packages/jest-mock/src/__tests__/jest_mock.test.js:539:20)

Test Suites: 1 failed, 1 total Tests: 1 failed, 37 passed, 38 total Snapshots: 0 total

acamposruiz commented 7 years ago

image