Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify diff coloring for lower cognitive load #8572

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`.hasAssertions() throws if expected is not undefined 1`] = `
"<dim>expect(</><red>received</><dim>)[.not].hasAssertions()</>
"<dim>expect(</>received</><dim>)[.not].hasAssertions()</>

<bold>Matcher error</>: this matcher must not have an expected argument

Expand Down
42 changes: 21 additions & 21 deletions packages/expect/src/__tests__/__snapshots__/extend.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`defines asymmetric unary matchers 1`] = `
"<dim>expect(</><red>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>
"<dim>expect(</>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>

<green>- Expected</>
<red>+ Received</>
<red>- Expected</>
+ Received</>

<dim> Object {</>
<green>- \\"value\\": toBeDivisibleBy<2>,</>
<red>+ \\"value\\": 3,</>
<red>- \\"value\\": toBeDivisibleBy<2>,</>
+ \\"value\\": 3,</>
<dim> }</>"
`;

exports[`defines asymmetric unary matchers that can be prefixed by not 1`] = `
"<dim>expect(</><red>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>
"<dim>expect(</>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>

<green>- Expected</>
<red>+ Received</>
<red>- Expected</>
+ Received</>

<dim> Object {</>
<green>- \\"value\\": not.toBeDivisibleBy<2>,</>
<red>+ \\"value\\": 2,</>
<red>- \\"value\\": not.toBeDivisibleBy<2>,</>
+ \\"value\\": 2,</>
<dim> }</>"
`;

exports[`defines asymmetric variadic matchers 1`] = `
"<dim>expect(</><red>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>
"<dim>expect(</>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>

<green>- Expected</>
<red>+ Received</>
<red>- Expected</>
+ Received</>

<dim> Object {</>
<green>- \\"value\\": toBeWithinRange<4, 11>,</>
<red>+ \\"value\\": 3,</>
<red>- \\"value\\": toBeWithinRange<4, 11>,</>
+ \\"value\\": 3,</>
<dim> }</>"
`;

exports[`defines asymmetric variadic matchers that can be prefixed by not 1`] = `
"<dim>expect(</><red>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>
"<dim>expect(</>received</><dim>).</>toEqual<dim>(</><green>expected</><dim>) // deep equality</>

<green>- Expected</>
<red>+ Received</>
<red>- Expected</>
+ Received</>

<dim> Object {</>
<green>- \\"value\\": not.toBeWithinRange<1, 3>,</>
<red>+ \\"value\\": 2,</>
<red>- \\"value\\": not.toBeWithinRange<1, 3>,</>
+ \\"value\\": 2,</>
<dim> }</>"
`;

exports[`is available globally when matcher is unary 1`] = `"expected 15 to be divisible by 2"`;

exports[`is available globally when matcher is variadic 1`] = `"expected 15 to be within range 1 - 3"`;

exports[`is ok if there is no message specified 1`] = `"<red>No message was specified for this matcher.</>"`;
exports[`is ok if there is no message specified 1`] = `"No message was specified for this matcher.</>"`;
Loading