Skip to content

Commit ea00d16

Browse files
emaincourtcpojer
authored andcommitted
Remove 'only' from '...to be called but only received...' messages (#3818)
* Removed `only` on assertions expectations * Updated snapshots on assertions count error
1 parent eb4c0ab commit ea00d16

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

integration_tests/__tests__/__snapshots__/failures.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ exports[`not throwing Error objects 4`] = `
3737
at __tests__/assertion_count.test.js:14:17
3838
● .assertions() › throws
3939
expect.assertions(2)
40-
Expected two assertions to be called but only received one assertion call.
40+
Expected two assertions to be called but received one assertion call.
4141
● .assertions() › throws on redeclare of assertion count
4242
expect(received).toBeTruthy()
4343
Expected value to be truthy, instead received
4444
false
4545
at __tests__/assertion_count.test.js:18:17
4646
● .assertions() › throws on assertion
4747
expect.assertions(0)
48-
Expected zero assertions to be called but only received one assertion call.
48+
Expected zero assertions to be called but received one assertion call.
4949
● .hasAssertions() › throws when there are not assertions
5050
expect.hasAssertions()
5151
Expected at least one assertion to be called but received none.

packages/jest-matchers/src/extract_expected_assertions_errors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const extractExpectedAssertionsErrors = () => {
3939
isDirectExpectCall: true,
4040
}) +
4141
'\n\n' +
42-
`Expected ${numOfAssertionsExpected} to be called but only received ` +
42+
`Expected ${numOfAssertionsExpected} to be called but received ` +
4343
RECEIVED_COLOR(pluralize('assertion call', assertionCalls || 0)) +
4444
'.',
4545
);

0 commit comments

Comments
 (0)