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

jest --runInBand fails occasionally #1443

Closed
cmdcolin opened this issue Nov 13, 2020 · 2 comments
Closed

jest --runInBand fails occasionally #1443

cmdcolin opened this issue Nov 13, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@cmdcolin
Copy link
Collaborator

yarn test --runInBand often fails with this error for me

node 14.15.0


Summary of all failing tests
 FAIL  plugins/linear-genome-view/src/LinearGenomeView/components/LinearGenomeView.test.js
  ● <LinearGenomeView /> › renders one track, one region

    expect(received).toMatchSnapshot()

    Snapshot name: `<LinearGenomeView /> renders one track, one region 1`

    - Snapshot
    + Received

    @@ -163,30 +163,51 @@
                  <div
                    class="MuiFormControl-root MuiTextField-root makeStyles-headerRefName MuiFormControl-fullWidth"
                    style="margin: 7px;"
                  >
                    <div
    -                 class="MuiInputBase-root MuiOutlinedInput-root MuiAutocomplete-inputRoot MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-adornedEnd MuiOutlinedInput-adornedEnd"
    +                 class="MuiInputBase-root MuiOutlinedInput-root MuiAutocomplete-inputRoot MuiInputBase-disabled MuiOutlinedInput-disabled MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-adornedEnd MuiOutlinedInput-adornedEnd"
                      style="padding: 0px; height: 32px; background: rgba(255, 255, 255, 0.8);"
                    >
                      <input
                        aria-autocomplete="list"
                        aria-invalid="false"
                        autocapitalize="none"
                        autocomplete="off"
    -                   class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused MuiInputBase-inputAdornedEnd MuiOutlinedInput-inputAdornedEnd"
    +                   class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused MuiInputBase-disabled MuiOutlinedInput-disabled MuiInputBase-inputAdornedEnd MuiOutlinedInput-inputAdornedEnd"
    +                   disabled=""
                        id="refNameAutocomplete-lgv"
                        spellcheck="false"
                        type="text"
    -                   value="ctgA"
    +                   value=""
                      />
    +                 <div
    +                   class="MuiCircularProgress-root MuiCircularProgress-indeterminate"
    +                   role="progressbar"
    +                   style="width: 20px; height: 20px;"
    +                 >
    +                   <svg
    +                     class="MuiCircularProgress-svg"
    +                     viewBox="22 22 44 44"
    +                   >
    +                     <circle
    +                       class="MuiCircularProgress-circle MuiCircularProgress-circleIndeterminate"
    +                       cx="44"
    +                       cy="44"
    +                       fill="none"
    +                       r="20.2"
    +                       stroke-width="3.6"
    +                     />
    +                   </svg>
    +                 </div>
                      <div
                        class="MuiAutocomplete-endAdornment"
                      >
                        <button
                          aria-label="Open"
    -                     class="MuiButtonBase-root MuiIconButton-root MuiAutocomplete-popupIndicator"
    +                     class="MuiButtonBase-root MuiIconButton-root MuiAutocomplete-popupIndicator MuiIconButton-disabled MuiButtonBase-disabled"
    +                     disabled=""
                          tabindex="-1"
                          title="Open"
                          type="button"
                        >
                          <span
    @@ -201,13 +222,10 @@
                              <path
                                d="M7 10l5 5 5-5z"
                              />
                            </svg>
                          </span>
    -                     <span
    -                       class="MuiTouchRipple-root"
    -                     />
                        </button>
                      </div>
                      <fieldset
                        aria-hidden="true"
                        class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline"
    @@ -246,11 +264,11 @@
                      </svg>
                      <input
                        aria-invalid="false"
                        class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputAdornedStart MuiOutlinedInput-inputAdornedStart"
                        type="text"
    -                   value="ctgA:1..100"
    +                   value=""
                      />
                      <fieldset
                        aria-hidden="true"
                        class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline"
                        style="padding-left: 8px;"
    @@ -269,11 +287,11 @@
                </form>
              </div>
              <p
                class="MuiTypography-root makeStyles-bp MuiTypography-body2 MuiTypography-colorTextSecondary"
              >
    -           100 bp
    +           0 bp
              </p>
              <div
                class="makeStyles-container"
              >
                <button

      78 |     const { container, findByText } = render(<LinearGenomeView model={model} />)
      79 |     await findByText('Foo Track')
    > 80 |     expect(container.firstChild).toMatchSnapshot()
         |                                  ^
      81 |   })
      82 |   it('renders two tracks, two regions', async () => {
      83 |     const session = createTestSession()

      at _callee2$ (plugins/linear-genome-view/src/LinearGenomeView/components/LinearGenomeView.test.js:80:34)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:63:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:293:22)
      at Generator.next (node_modules/regenerator-runtime/runtime.js:118:21)
      at asyncGeneratorStep (node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)


Snapshot Summary
 › 1 snapshot failed from 1 test suite. Inspect your code changes or run `yarn test -u` to update them.

Test Suites: 1 failed, 2 skipped, 120 passed, 121 of 123 total
Tests:       1 failed, 3 skipped, 458 passed, 462 total
Snapshots:   1 failed, 233 passed, 234 total
Time:        127.901s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@cmdcolin cmdcolin added the bug Something isn't working label Nov 13, 2020
@cmdcolin
Copy link
Collaborator Author

Exported from #1438
If anyone can confirm or disconfirm would be interesting.

Might also try yarn test --clearCache just to see if it changes anything

@cmdcolin
Copy link
Collaborator Author

May have been fixed by #1438

Doesn't happen for me anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant