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

jest.config.js > testMatch pattern is not working on windows 10 machine #1777

Closed
ravish-tech opened this issue Jul 6, 2018 · 2 comments
Closed

Comments

@ravish-tech
Copy link

ravish-tech commented Jul 6, 2018

Version

3.0.0-rc.3

Steps to reproduce

Create new project with jest using cli on windows 10 machine. Run "yarn run test:unit".

vue-cli creates jest.config.js file with following testMatch
'<rootDir>/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))'

What is expected?

Tests within
/tests/unit/** and
**/__tests__/**
should be found and run.

What is actually happening?

Jest complains: no tests found.
I think on windows jest is not able to match the whole path.


by removing rootDir from the testMatch it works.

@LinusBorg
Copy link
Member

LinusBorg commented Jul 6, 2018

Duplicate of #1686

@LinusBorg LinusBorg marked this as a duplicate of #1686 Jul 6, 2018
@karthikatl
Copy link

({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import _Object$defineProperty from "../../core-js/object/define-property";
^^^^^^

SyntaxError: Cannot use import statement outside a module

  17 |             <template #selection="data">
  18 |               <v-chip :key="data.item.entity_id" :input-value="data.selected">
> 19 |                 <p>{{ data.item.display_name }}-{{ data.item.profile.emp_id }}-{{ data.item.profile.guard_id}}</p>
     |                                               ^
  20 |               </v-chip>
  21 |             </template>
  22 |           </v-autocomplete>

  at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
  at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
  at src/ui/sections/Patrol/PatrolSupervisorValidationStatus.vue:19:47
  at Object.<anonymous> (src/ui/sections/Patrol/PatrolSupervisorValidationStatus.vue:166:3)

i have this error. any solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants