Why does Jest act funny on Meteor?


#1

So I have been able to maintain my Jest tests during all the Meteor upgrading. However, even though my tests run, I am not able to specify a particular test or test directory. If I run npm test all the tests run, but when I run npm test client/modules/some_folder I get the message `No tests found for “client/modules/some_folder”. Anyone else getting issues like this?

Here is my package.json

{
  "name": "test-agolo",
  "version": "1.0.0",
  "description": "agolo",
  "main": "test-agolo.js",
  "scripts": {
    "test": "jest",
    "clean-cache": "cd .meteor/local/bundler-cache/linker/; rm -rf *"
  },
  "author": "",
  "license": "ISC",
  "babel": {
    "env": {
      "production": {
        "plugins": [
          "transform-react-constant-elements",
          "transform-react-inline-elements"
        ]
      }
    }
  },
  "jest": {
    "setupEnvScriptFile": "<rootDir>/.scripts/setup-jest-tests.js",
    "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
    "testPathDirs": [
      "<rootDir>/client/modules"
    ],
    "testDirectoryName": "client/modules",
    "testFileExtensions": [
      "tests.js",
      "tests.jsx"
    ],
    "moduleFileExtensions": [
      "js",
      "jsx",
      "json",
      "node"
    ],
    "unmockedModulePathPatterns": [
      "underscore/.*",
      "core-js/.*",
      "babel-runtime/.*",
      "react/.*",
      "react-dom/.*",
      "fbjs/.*",
      "react-addons-test-utils/.*",
      "enzyme/.*"
    ]
  },
  "devDependencies": {
    "babel-jest": "^9.0.0",
    "babel-preset-es2015": "*",
    "babel-preset-react": "*",
    "jest-cli": "*",
    "babel-core": "^6.3.17",
    "babel-loader": "^6.2.0",
    "babel-plugin-transform-decorators-legacy": "^1.2.0",
    "babel-plugin-transform-es2015-modules-commonjs": "^6.4.0",
    "babel-plugin-transform-runtime": "^6.3.13",
    "babel-plugin-transform-strict-mode": "^6.3.13",
    "babel-preset-stage-0": "^6.3.13",
    "classnames": "^2.2.1",
    "enzyme": "^2.2.0",
    "jest-cli": "^12.0.2",
    "json-loader": "^0.5.4",
    "karma": "^0.13.16",
    "karma-chrome-launcher": "^0.2.2",
    "karma-firefox-launcher": "^0.1.7",
    "karma-jasmine": "^0.3.6",
    "karma-sourcemap-loader": "0.3.6",
    "karma-webpack": "1.7.0",
    "phantomjs": "^1.9.19",
    "react-addons-test-utils": "^15.0.1",
    "shelljs": "^0.5.3",
    "underscore": "^1.8.3",
    "velocity-cli": "^0.4.3",
    "wallaby-webpack": "0.0.10",
    "webpack": "^1.12.9"
  },
  "dependencies": {
    "btoa": "^1.1.2",
    "classnames": "^2.2.3",
    "d3": "^3.5.16",
    "moment": "^2.13.0",
    "radium": "^0.17.1",
    "react": "^15.0.1",
    "react-addons-css-transition-group": "^15.0.1",
    "react-addons-pure-render-mixin": "^15.0.1",
    "react-addons-shallow-compare": "^15.0.1",
    "react-dom": "^15.0.1",
    "react-icons": "^2.0.1",
    "react-input-range": "^0.6.2",
    "react-loading": "0.0.9",
    "react-motion": "^0.4.3",
    "react-motion-ui-pack": "^0.7.1",
    "react-progress-label": "^1.2.1",
    "react-redux": "^4.4.5",
    "react-router": "^2.2.4",
    "react-selectize": "https://github.com/tgoldenberg/react-selectize/tarball/add_js",
    "react-tooltip": "^1.2.0",
    "redux": "^3.4.0",
    "underscore": "^1.8.3",
    "underscore.string": "^3.2.2"
  }
}