question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin not reading jest.config.json file even when settings are updated

See original GitHub issue

The plugin is not honoring the jest.config.json file that has configurations for Less pre-processing.

FAIL ui/tests/components/Home.spec.js

  ● Test suite failed to run

    /Users/asdesai/Documents/coding/yeoman/react-boilerplate/ui/styles/components/home.less:8
     @fullWidth: 100%;
     ^
    SyntaxError: Invalid or unexpected token

    > 1 | import React from 'react'
      2 | // import DemoComponentLeft from './DemoComponentLeft'
      3 | // import DemoComponentRight from './DemoComponentRight'
      4 | import s from '../styles/components/home.less'
      
      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:318:17)
      at Object.<anonymous> (ui/components/Home.js:1:428)
      at Object.<anonymous> (ui/tests/components/Home.spec.js:2:320)


Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.546s
Ran all test suites related to changed files.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
stephtrcommented, Feb 4, 2018

@orta, how do you feel about extending the Runner in jest-editor-support to support --watchAll? I’m thinking start() can also accept {watch: boolean, watchAll: boolean}.

So it probably would be best to look for "please use --watchAll" in the error output and restart with --watchAll instead of --watch? Should that change be done before, in combination or after merging #215?

0reactions
doomsbustercommented, Jan 21, 2018

This plugin’s configuration property jestConfigPath in user preference settings in VSCode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jest
note. Keep in mind that the resulting configuration object must always be JSON-serializable. · tip. To read TypeScript configuration files Jest ...
Read more >
How to write a Jest configuration file - Stack Overflow
I figured out that the config file is JSON. { "testPathDirs": ["coredata/src"] }. Unfortunately I found nowhere in the documentation a hint ...
Read more >
Configuring package.json · Jest
This config option lets you customize where Jest stores that cache data on disk.
Read more >
Configuration - Quokka.js
Quokka supports 4 sources of configuration (in addition to editor extension UI related settings):. global config file,; project's package.json file, ...
Read more >
Jest Configuration And Debugging Jest Based Tests
Learn about Jest Config, Debugging and comparing Jest with other ... In the existing package.json file, add a new key named “jest”.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found