keplersj / atom-test-runner-jest

Atom Test Runner for Jest
4 stars 1 forks source link

Jest Configs Outside of Package Manifest Not Recognized #2

Open stevenzeck opened 6 years ago

stevenzeck commented 6 years ago

I updated atom-test-runner-jest to 0.2.3 from 0.1.3. When I run atom --test spec, it errors with:

ReferenceError: atom is not defined

The console shows this error happening on two lines:
https://github.com/szeck87/atom-beautify/blob/unibeautify/spec/atombeautify.spec.js#L4 https://github.com/szeck87/atom-beautify/blob/unibeautify/spec/atombeautify.spec.js#L11. 0.1.3 did not have any errors.

keplersj commented 6 years ago

I just did some debugging on your project. I resolved the issue by moving the Jest config to package.json from jest.config.js. It looks to me that Jest was running your test suite the environment as set up by jest-preset-atom was not being configured.

keplersj commented 6 years ago

jest.config.js is a valid way to config Jest and should work with this test runner. This will be fixed.

stevenzeck commented 6 years ago

Is it an error here or should I open it in https://github.com/keplersj/jest-preset-atom?

keplersj commented 6 years ago

The bug is here