Skip to content

yarn test --watch fails on subsequent runs #14698

Description

@eps1lon
  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

yarn workspace @material-ui/core --watch has the same result between runs

Current Behavior 😯

Every subsequent runs fails with

 1) <ButtonBase />
       "before all" hook:
     TypeError: Cannot read property 'classes' of undefined
      at getClasses (packages/material-ui/src/test-utils/getClasses.js:22:2)
      at Context.<anonymous> (packages/material-ui/src/ButtonBase/ButtonBase.test.js:21:15)

  2) <TouchRipple />
       "before all" hook:
     TypeError: Cannot read property 'classes' of undefined
      at getClasses (packages/material-ui/src/test-utils/getClasses.js:22:2)
      at Context.<anonymous> (packages/material-ui/src/ButtonBase/TouchRipple.test.js:18:15)

  3) <Typography />
       "before all" hook:
     TypeError: Cannot read property 'classes' of undefined
      at getClasses (packages/material-ui/src/test-utils/getClasses.js:22:2)
      at Context.<anonymous> (packages/material-ui/src/Typography/Typography.test.js:12:15)

  4) <TableRow> integration
       "before all" hook:
     TypeError: Cannot read property 'classes' of undefined
      at getClasses (packages/material-ui/src/test-utils/getClasses.js:22:2)
      at Context.<anonymous> (packages/material-ui/test/integration/TableCell.test.js:23:15)

  5) <TableRow> integration
       "after all" hook:
     TypeError: Cannot read property 'cleanUp' of undefined
      at Context.cleanUp (packages/material-ui/test/integration/TableCell.test.js:28:11)

  6) <TableRow> integration
       "before all" hook:
     TypeError: Cannot read property 'classes' of undefined
      at getClasses (packages/material-ui/src/test-utils/getClasses.js:22:2)
      at Context.<anonymous> (packages/material-ui/test/integration/TableRow.test.js:13:15)

  7) <TableRow> integration
       "after all" hook:
     TypeError: Cannot read property 'cleanUp' of undefined
      at Context.cleanUp (packages/material-ui/test/integration/TableRow.test.js:18:11)

Steps to Reproduce 🕹

  1. yarn workspace @material-ui/core test --watch
  2. Change some whitespace in a file
  3. test rerun with fail

Context 🔦

If I only run the tests that failed in the subsequent runs everything works fine i.e. describe.only('ButtonBase'

Your Environment 🌎

Tech Version
Material-UI next branch
OS Ubuntu 18.04.2 LTS
node 10.15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    testtype: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions