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

Unwanted external script are covered. #967

Closed
minhyeong-kim opened this issue May 4, 2016 · 2 comments
Closed

Unwanted external script are covered. #967

minhyeong-kim opened this issue May 4, 2016 · 2 comments

Comments

@minhyeong-kim
Copy link

minhyeong-kim commented May 4, 2016

My project has dependency for external script file. so i add it to configure.setupFiles property. see below.

    "setupFiles": [
      "bower_components/tui-code-snippet/code-snippet.js",
      "node_modules/dom/dom.js"
    ]

The problem is, code-snippet.js covered by jest coverage features.

2016-05-04 11 51 41

Modules in 'node_modules' are properly ignored. but modules in 'bower_component' are not ignored properly.

I attached my jest full configuration for this issue.

  "jest": {
    "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
    "unmockedModulePathPatterns": [
      "/node_modules/",
      "/bower_components/"
    ],
    "moduleFileExtensions": [
      "js",
      "jsx"
    ],
    "testDirectoryName": "src",
    "testFileExtensions": [
      "spec.jsx"
    ],
    "setupFiles": [
      "bower_components/tui-code-snippet/code-snippet.js",
      "node_modules/dom/dom.js"
    ]
  },
@cpojer
Copy link
Member

cpojer commented Jul 1, 2016

We added a config option for this in #1233 and it will be shipped soon.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants