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

JOSS review: yarn test fails #172

Open
Luthaf opened this issue Mar 2, 2020 · 2 comments
Open

JOSS review: yarn test fails #172

Luthaf opened this issue Mar 2, 2020 · 2 comments

Comments

@Luthaf
Copy link

Luthaf commented Mar 2, 2020

What I did:

git clone git@github.com:ToyotaResearchInstitute/materialnet.git
cd materialnet
yarn install
yarn test
# press a to run all tests

What I got

 FAIL  src/App.test.js
  ● Test suite failed to run

    Jest encountered an unexpected token

    This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.

    By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".

    Here's what you can do:
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/en/configuration.html

    Details:

    /local/scratch/fraux/code/tests/materialnet/node_modules/lodash-es/lodash.js:10
    export { default as add } from './add.js';
    ^^^^^^

    SyntaxError: Unexpected token 'export'

       9 | import MenuItem from '@material-ui/core/MenuItem';
      10 | import CancelIcon from '@material-ui/icons/Cancel';
    > 11 | import { deburr } from 'lodash-es';
         | ^
      12 | import { ListItemText, ListItemSecondaryAction } from '@material-ui/core';
      13 | 
      14 | // BASED on https://material-ui.com/components/autocomplete/

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)
      at Object.<anonymous> (src/components/controls/reactselect.js:11:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        4.044s
Ran all test suites.

System information: Ubuntu 18.04, node 13.8.0, yarn 1.22.0.

@waxlamp
Copy link
Collaborator

waxlamp commented Mar 2, 2020

This is actually just the stub testing infrastructure, which we are not using. See #173 (which I just opened to solve this problem).

@Luthaf
Copy link
Author

Luthaf commented Mar 2, 2020

Ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants