Closed milesj closed 6 years ago
I got it to work briefly using moduleFileExtensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
, but then it stopped working again. This seems really weird.
Turns out the problem was that my moduleFileExtensions
had a preceeding period. Perhaps Jest should check for that.
That should definitely be in the docs! Mind sending a PR for it?
im having the same issue.im actually doing the udemy course and currently working on testing..
No tests found
No files found in C:\Users\sidka\nodejs\node_modules\redux-adv-burger--01-async-action-ingredients.
Make sure Jest's configuration does not exclude this directory.
To set up Jest, make sure a package.json file exists.
Jest Documentation: facebook.github.io/jest/docs/configuration.html
Pattern: /NavigationItems/ - 0 matches
Active Filters: filename /NavigationItems/ › Press c to clear filters.
Watch Usage › Press a to run all tests. › Press o to only run tests related to changed files. › Press p to filter by a filename regex pattern. › Press t to filter by a test name regex pattern. › Press q to quit watch mode. › Press Enter to trigger a test run. ..what do i do?
this is package.json file..
{
"name": "react-complete-guide",
"version": "0.1.0",
"private": true,
"dependencies": {
"autoprefixer": "7.1.2",
"axios": "^0.16.2",
"babel-core": "6.25.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.1",
"babel-preset-react-app": "^3.0.2",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"css-loader": "0.28.4",
"dotenv": "4.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"eslint": "4.4.1",
"eslint-config-react-app": "^2.0.0",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.1.0",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"jest": "20.0.4",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.6",
"promise": "8.0.1",
"prop-types": "^15.6.0",
"r": "0.0.5",
"react": "^16.0.0",
"react-dev-utils": "^4.0.1",
"react-dom": "^16.0.0",
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
"react-test-renderer": "^16.13.1",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"style-loader": "0.18.2",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.5.9",
"webpack": "3.5.1",
"webpack-dev-server": "2.7.1",
"webpack-manifest-plugin": "1.2.1",
"whatwg-fetch": "2.0.3"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
"collectCoverageFrom": [
"src//.{js,jsx}"
],
"setupFiles": [
"
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
Bug report.
What is the current behavior?
I'm converting one of my projects to TypeScript here: https://github.com/milesj/optimal Running
yarn run jest
will not find and run any tests, no matter what variation oftestMatch
andtestRegex
that Itry. That being said, it's correctly finding myjest.config.js
, as denoted when using--debug
, as seen below.What is the expected behavior?
It finds and runs my tests.
Please provide your exact Jest configuration
My Jest configuration is automatically built with Beemo, but looks like the following.
Run
npx envinfo --preset jest
in your project directory and paste the results hereSystem: OS: macOS High Sierra 10.13.3 CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Binaries: Node: 9.8.0 Yarn: 1.5.1 npm: 5.1.0