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

Add missing escape sequences to ConvertAnsi plugin #4544

Merged
merged 2 commits into from
Sep 27, 2017
Merged
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
960 changes: 480 additions & 480 deletions packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions packages/expect/src/__tests__/__snapshots__/spy_matchers.test.js.snap

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`.toThrow() error class did not throw at all 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>type</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>type</><dim>)</>
Expected the function to throw an error of type:
<green>\\"Err\\"</>
But it didn't throw anything."
`;
exports[`.toThrow() error class threw, but class did not match 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>type</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>type</><dim>)</>
Expected the function to throw an error of type:
<green>\\"Err2\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrow() error class threw, but should not have 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrow(<green>type</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrow(</><green>type</><dim>)</>
Expected the function not to throw an error of type:
<green>\\"Err\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrow() invalid actual 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>undefined</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>undefined</><dim>)</>
Received value must be a function, but instead \\"string\\" was found"
`;
exports[`.toThrow() invalid arguments 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrow(<green>number</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrow(</><green>number</><dim>)</>
Unexpected argument passed.
Expected: <green>\\"string\\"</>, <green>\\"Error (type)\\"</> or <green>\\"regexp\\"</>.
Expand All @@ -44,97 +44,97 @@ Got:
`;
exports[`.toThrow() regexp did not throw at all 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>regexp</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>regexp</><dim>)</>
Expected the function to throw an error matching:
<green>/apple/</>
But it didn't throw anything."
`;
exports[`.toThrow() regexp threw, but message did not match 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>regexp</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>regexp</><dim>)</>
Expected the function to throw an error matching:
<green>/banana/</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrow() regexp threw, but should not have 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrow(<green>regexp</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrow(</><green>regexp</><dim>)</>
Expected the function not to throw an error matching:
<green>/apple/</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrow() strings did not throw at all 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>string</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>string</><dim>)</>
Expected the function to throw an error matching:
<green>\\"apple\\"</>
But it didn't throw anything."
`;
exports[`.toThrow() strings threw, but message did not match 1`] = `
"<dim>expect(<red>function</><dim>).toThrow(<green>string</><dim>)
"<dim>expect(</><red>function</><dim>).toThrow(</><green>string</><dim>)</>
Expected the function to throw an error matching:
<green>\\"banana\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrow() strings threw, but should not have 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrow(<green>string</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrow(</><green>string</><dim>)</>
Expected the function not to throw an error matching:
<green>\\"apple\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrowError() error class did not throw at all 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>type</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>type</><dim>)</>
Expected the function to throw an error of type:
<green>\\"Err\\"</>
But it didn't throw anything."
`;
exports[`.toThrowError() error class threw, but class did not match 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>type</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>type</><dim>)</>
Expected the function to throw an error of type:
<green>\\"Err2\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrowError() error class threw, but should not have 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrowError(<green>type</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrowError(</><green>type</><dim>)</>
Expected the function not to throw an error of type:
<green>\\"Err\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrowError() invalid actual 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>undefined</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>undefined</><dim>)</>
Received value must be a function, but instead \\"string\\" was found"
`;
exports[`.toThrowError() invalid arguments 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrowError(<green>number</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrowError(</><green>number</><dim>)</>
Unexpected argument passed.
Expected: <green>\\"string\\"</>, <green>\\"Error (type)\\"</> or <green>\\"regexp\\"</>.
Expand All @@ -143,57 +143,57 @@ Got:
`;
exports[`.toThrowError() regexp did not throw at all 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>regexp</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>regexp</><dim>)</>
Expected the function to throw an error matching:
<green>/apple/</>
But it didn't throw anything."
`;
exports[`.toThrowError() regexp threw, but message did not match 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>regexp</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>regexp</><dim>)</>
Expected the function to throw an error matching:
<green>/banana/</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrowError() regexp threw, but should not have 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrowError(<green>regexp</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrowError(</><green>regexp</><dim>)</>
Expected the function not to throw an error matching:
<green>/apple/</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrowError() strings did not throw at all 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>string</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>string</><dim>)</>
Expected the function to throw an error matching:
<green>\\"apple\\"</>
But it didn't throw anything."
`;
exports[`.toThrowError() strings threw, but message did not match 1`] = `
"<dim>expect(<red>function</><dim>).toThrowError(<green>string</><dim>)
"<dim>expect(</><red>function</><dim>).toThrowError(</><green>string</><dim>)</>
Expected the function to throw an error matching:
<green>\\"banana\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
exports[`.toThrowError() strings threw, but should not have 1`] = `
"<dim>expect(<red>function</><dim>).not.toThrowError(<green>string</><dim>)
"<dim>expect(</><red>function</><dim>).not.toThrowError(</><green>string</><dim>)</>
Expected the function not to throw an error matching:
<green>\\"apple\\"</>
Instead, it threw:
<red> Error </>
<red> <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
<red> <dim>at jestExpect (</>packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</></>"
`;
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 1`] = `"<dim>should⏎ </>name</><dim> the ⏎function you at..."`;
exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 1`] = `"<dim>should⏎ </></>name</><dim> the ⏎function you at...</>"`;
exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 2`] = `"<dim>should⏎ </>name</><dim> the ⏎function you at..."`;
exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 2`] = `"<dim>should⏎ </></>name</><dim> the ⏎function you at...</>"`;
exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 3`] = `"<dim>should⏎ </>name</><dim> the ⏎function you at..."`;
exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 3`] = `"<dim>should⏎ </></>name</><dim> the ⏎function you at...</>"`;
exports[`for one line test name pattern in the middle test name with cutted tail and cutted highlighted pattern 1`] = `"<dim>should </>nam...</>"`;
exports[`for one line test name pattern in the middle test name with cutted tail and cutted highlighted pattern 1`] = `"<dim>should </></>nam...</>"`;
exports[`for one line test name pattern in the middle test name with cutted tail and highlighted pattern 1`] = `"<dim>should </>name</><dim> the functi..."`;
exports[`for one line test name pattern in the middle test name with cutted tail and highlighted pattern 1`] = `"<dim>should </></>name</><dim> the functi...</>"`;
exports[`for one line test name pattern in the middle test name with highlighted cutted 1`] = `"<dim>sho</>...</>"`;
exports[`for one line test name pattern in the middle test name with highlighted cutted 1`] = `"<dim>sho</></>...</>"`;
exports[`for one line test name pattern in the middle test name with highlighted pattern returns 1`] = `"<dim>should </>name</><dim> the function you attach"`;
exports[`for one line test name pattern in the middle test name with highlighted pattern returns 1`] = `"<dim>should </></>name</><dim> the function you attach</>"`;
exports[`for one line test name pattern in the tail returns test name with cutted tail and cutted highlighted pattern 1`] = `"<dim>should name the function you </>a...</>"`;
exports[`for one line test name pattern in the tail returns test name with cutted tail and cutted highlighted pattern 1`] = `"<dim>should name the function you </></>a...</>"`;
exports[`for one line test name pattern in the tail returns test name with highlighted cutted 1`] = `"<dim>sho</>...</>"`;
exports[`for one line test name pattern in the tail returns test name with highlighted cutted 1`] = `"<dim>sho</></>...</>"`;
exports[`for one line test name pattern in the tail returns test name with highlighted pattern 1`] = `"<dim>should name the function you </>attach</>"`;
exports[`for one line test name pattern in the tail returns test name with highlighted pattern 1`] = `"<dim>should name the function you </></>attach</>"`;
exports[`for one line test name with pattern in the head returns test name with cutted tail and cutted highlighted pattern 1`] = `"</>shoul...</>"`;
exports[`for one line test name with pattern in the head returns test name with cutted tail and highlighted pattern 1`] = `"</>should</><dim> name the function yo..."`;
exports[`for one line test name with pattern in the head returns test name with cutted tail and highlighted pattern 1`] = `"</>should</><dim> name the function yo...</>"`;
exports[`for one line test name with pattern in the head returns test name with highlighted pattern 1`] = `"</>should</><dim> name the function you attach"`;
exports[`for one line test name with pattern in the head returns test name with highlighted pattern 1`] = `"</>should</><dim> name the function you attach</>"`;
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

exports[`Retrieves the snapshot status 1`] = `
Array [
"<bold><green> › 1 snapshot</> written.",
"<bold><green> › 1 snapshot</> updated.",
"<bold><red> › 1 obsolete snapshot</> found.",
"<bold><red> › 1 snapshot test</> failed.",
"<bold><green> › 1 snapshot</></> written.",
"<bold><green> › 1 snapshot</></> updated.",
"<bold><red> › 1 obsolete snapshot</></> found.",
"<bold><red> › 1 snapshot test</></> failed.",
]
`;
exports[`Retrieves the snapshot status after a snapshot update 1`] = `
Array [
"<bold><green> › 2 snapshots</> written.",
"<bold><green> › 2 snapshots</> updated.",
"<bold><red> › 2 obsolete snapshots</> removed.",
"<bold><red> › Obsolete snapshot file</> removed.",
"<bold><red> › 2 snapshot tests</> failed.",
"<bold><green> › 2 snapshots</></> written.",
"<bold><green> › 2 snapshots</></> updated.",
"<bold><red> › 2 obsolete snapshots</></> removed.",
"<bold><red> › Obsolete snapshot file</></> removed.",
"<bold><red> › 2 snapshot tests</></> failed.",
]
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@

exports[`creates a snapshot summary 1`] = `
Array [
"<bold>Snapshot Summary",
"<bold><green> › 1 snapshot</> written in 1 test suite.",
"<bold><red> › 1 snapshot test</> failed in 1 test suite. <dim>Inspect your code changes or press --u to update them.",
"<bold><green> › 1 snapshot</> updated in 1 test suite.",
"<bold><red> › 1 obsolete snapshot file</> found, press --u to remove it.",
"<bold><red> › 1 obsolete snapshot</> found, press --u to remove it.",
"<bold>Snapshot Summary</>",
"<bold><green> › 1 snapshot</></> written in 1 test suite.",
"<bold><red> › 1 snapshot test</></> failed in 1 test suite. <dim>Inspect your code changes or press --u to update them.</>",
"<bold><green> › 1 snapshot</></> updated in 1 test suite.",
"<bold><red> › 1 obsolete snapshot file</></> found, press --u to remove it.",
"<bold><red> › 1 obsolete snapshot</></> found, press --u to remove it.",
]
`;
exports[`creates a snapshot summary after an update 1`] = `
Array [
"<bold>Snapshot Summary",
"<bold><green> › 1 snapshot</> written in 1 test suite.",
"<bold><red> › 1 snapshot test</> failed in 1 test suite. <dim>Inspect your code changes or press --u to update them.",
"<bold><green> › 1 snapshot</> updated in 1 test suite.",
"<bold><red> › 1 obsolete snapshot file</> removed.",
"<bold><red> › 1 obsolete snapshot</> removed.",
"<bold>Snapshot Summary</>",
"<bold><green> › 1 snapshot</></> written in 1 test suite.",
"<bold><red> › 1 snapshot test</></> failed in 1 test suite. <dim>Inspect your code changes or press --u to update them.</>",
"<bold><green> › 1 snapshot</></> updated in 1 test suite.",
"<bold><red> › 1 obsolete snapshot file</></> removed.",
"<bold><red> › 1 obsolete snapshot</></> removed.",
]
`;
exports[`creates a snapshot summary with multiple snapshot being written/updated 1`] = `
Array [
"<bold>Snapshot Summary",
"<bold><green> › 2 snapshots</> written in 2 test suites.",
"<bold><red> › 2 snapshot tests</> failed in 2 test suites. <dim>Inspect your code changes or press --u to update them.",
"<bold><green> › 2 snapshots</> updated in 2 test suites.",
"<bold><red> › 2 obsolete snapshot files</> found, press --u to remove them..",
"<bold><red> › 2 obsolete snapshots</> found, press --u to remove them.",
"<bold>Snapshot Summary</>",
"<bold><green> › 2 snapshots</></> written in 2 test suites.",
"<bold><red> › 2 snapshot tests</></> failed in 2 test suites. <dim>Inspect your code changes or press --u to update them.</>",
"<bold><green> › 2 snapshots</></> updated in 2 test suites.",
"<bold><red> › 2 obsolete snapshot files</></> found, press --u to remove them..",
"<bold><red> › 2 obsolete snapshots</></> found, press --u to remove them.",
]
`;
exports[`returns nothing if there are no updates 1`] = `
Array [
"<bold>Snapshot Summary",
"<bold>Snapshot Summary</>",
]
`;
Loading