Repository: facebook/react
File: packages/internal-test-utils/__tests__/ReactInternalTestUtils-test.js (JavaScript)

Code before:
        assertConsoleErrorDev(['Hello', 'Good day', 'Bye']);
      });
      expect(message).toMatchInlineSnapshot(`
        "assertConsoleErrorDev(expected)

        Missing component stack for:
          "Hello"

        Missing component stack for:
          "Good day"

        Missing component stack for:
          "Bye"

        If this error should omit a component stack, pass [log, {withoutStack: true}].
        If all errors should omit the component stack, add {withoutStack: true} to the assertConsoleErrorDev call."
      `);
    });

    // @gate __DEV__
    it('regression: checks entire string, not just the first letter', async () => {
      const message = expectToThrowFailure(() => {
        console.error('Message that happens to contain a "T"\n    in div');

        assertConsoleErrorDev([
          'This is a complete different message that happens to start with "T"',
        ]);
      });
      expect(message).toMatchInlineSnapshot(`
        "assertConsoleErrorDev(expected)

        Unexpected error(s) recorded.

        - Expected errors
        + Received errors

        - This is a complete different message that happens to start with "T"
        + Message that happens to contain a "T" <component stack>"
      `);
    });

    describe('global withoutStack', () => {
      // @gate __DEV__
      it('passes if errors without stack explicitly opt out', () => {
        console.error('Hello');
        assertConsoleErrorDev(['Hello'], {withoutStack: true});

        console.error('Hello');
        console.error('Good day');
        console.error('Bye');


Review comment (suggestion):
```suggestion
          'This is a completely different message that happens to start with "T"',
```

Code after:
        assertConsoleErrorDev(['Hello', 'Good day', 'Bye']);
      });
      expect(message).toMatchInlineSnapshot(`
        "assertConsoleErrorDev(expected)

        Missing component stack for:
          "Hello"

        Missing component stack for:
          "Good day"

        Missing component stack for:
          "Bye"

        If this error should omit a component stack, pass [log, {withoutStack: true}].
        If all errors should omit the component stack, add {withoutStack: true} to the assertConsoleErrorDev call."
      `);
    });

    // @gate __DEV__
    it('regression: checks entire string, not just the first letter', async () => {
      const message = expectToThrowFailure(() => {
        console.error('Message that happens to contain a "T"\n    in div');

        assertConsoleErrorDev([
          'This is a completely different message that happens to start with "T"',
        ]);
      });
      expect(message).toMatchInlineSnapshot(`
        "assertConsoleErrorDev(expected)

        Unexpected error(s) recorded.

        - Expected errors
        + Received errors

        - This is a complete different message that happens to start with "T"
        + Message that happens to contain a "T" <component stack>"
      `);
    });

    describe('global withoutStack', () => {
      // @gate __DEV__
      it('passes if errors without stack explicitly opt out', () => {
        console.error('Hello');
        assertConsoleErrorDev(['Hello'], {withoutStack: true});

        console.error('Hello');
        console.error('Good day');
        console.error('Bye');