theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 310 forks source link

Missing dot for tsx file extension in core lib executers Node.ts #1174

Closed lxghtless closed 3 years ago

lxghtless commented 3 years ago

Expected behavior

.tsx files should show up in code coverage.

Current behavior

.tsx files do not show up in code coverage.

Possible solution

There should be a dot in front of tsx here.

Steps to reproduce (for bugs)

  1. Run Intern against a TS base React project with .tsx files. Here's an example intern.json and command I'm using.
{
    "suites": ["test/**/*.ts", "test/**/*.tsx"],
    "coverage": ["src/**/*.ts", "src/**/*.tsx"],
    "reporters": ["runner", "jsoncoverage", "lcov", "htmlcoverage"],
    "plugins": [
        "node_modules/jsdom-global/register.js",
        "node_modules/ts-node/register/index.js"
    ],
    "environments": "node",
    "instrumenterOptions": {
        "esModules": true
    }
}

command: TS_NODE_PROJECT=test/tsconfig.json intern

  1. See that .tsx files do not show up in coverage results.

Environment

Intern version: 4.8.7 Node version: 12.18.4 NPM version: 6.14.6 Browser version: Not Applicable

Additional information

I went into node_modules and added the missing dot & that resulted in full coverage.


See PR #1175 for the fix.

jason0x43 commented 3 years ago

Resolved by a3b9643d43989d586dafc264200508ab96e65dfa