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

Fix yarn test:unit #724

Closed
amaury1093 opened this issue Sep 11, 2020 · 1 comment
Closed

Fix yarn test:unit #724

amaury1093 opened this issue Sep 11, 2020 · 1 comment
Labels
good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com/

Comments

@amaury1093
Copy link
Member

Running yarn test:unit gives error

 yarn test
yarn run v1.22.4
$ jest App
Expected react-native/jest-preset to define transform[^.+\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$]
react-native/jest-preset contained different transformIgnorePatterns than expected
 FAIL  App/stores/api.test.ts
  ● Test suite failed to run

    SyntaxError: /Users/amaury/Workspace/shootismoke/shoot-i-smoke/node_modules/react-native/Libraries/polyfills/error-guard.js: Unexpected token, expected ";" (14:5)

      12 | let _inGuard = 0;
      13 | 
    > 14 | type ErrorHandler = (error: mixed, isFatal: boolean) => void;
         |      ^
      15 | type Fn<Args, Return> = (...Args) => Return;
      16 | 
      17 | /**

      at Parser._raise (node_modules/@babel/parser/lib/index.js:742:17)
      at Parser.raiseWithData (node_modules/@babel/parser/lib/index.js:735:17)
      at Parser.raise (node_modules/@babel/parser/lib/index.js:729:17)
      at Parser.unexpected (node_modules/@babel/parser/lib/index.js:8757:16)
      at Parser.semicolon (node_modules/@babel/parser/lib/index.js:8739:40)
      at Parser.parseExpressionStatement (node_modules/@babel/parser/lib/index.js:11614:10)
      at Parser.parseStatementContent (node_modules/@babel/parser/lib/index.js:11215:19)
      at Parser.parseStatement (node_modules/@babel/parser/lib/index.js:11081:17)
      at Parser.parseBlockOrModuleBlockBody (node_modules/@babel/parser/lib/index.js:11656:25)
      at Parser.parseBlockBody (node_modules/@babel/parser/lib/index.js:11642:10)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.651s
Ran all test suites matching /App/i.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@amaury1093 amaury1093 added the good first issue Good for newcomers label Sep 11, 2020
@amaury1093 amaury1093 added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 1, 2020
bertoort added a commit to bertoort/shoot-i-smoke that referenced this issue Oct 3, 2020
$ jest App
Done in 5.66s. shootismoke#724
amaury1093 added a commit that referenced this issue Oct 4, 2020
* Fix yarn run v1.22.4
$ jest App
Done in 5.66s. #724

* ci: run unit tests in github pr workflow

* Update babel.config.js

* Update jest.config.js

* Update jest.config.js

* Update jest.config.js

* Update jest.config.js

Co-authored-by: Amaury Martiny <[email protected]>
@amaury1093
Copy link
Member Author

fixed in #753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

No branches or pull requests

1 participant