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

Error appear when i'm trying to execute script responsable to run tests. #63

Open
tiago-ilha opened this issue Jun 7, 2021 · 0 comments

Comments

@tiago-ilha
Copy link

tiago-ilha commented Jun 7, 2021

Describe the bug
TypeError: Jest: a transform must export something.
at /Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/transform/build/ScriptTransformer.js:386:19
at async Promise.all (index 0)
at async ScriptTransformer.loadTransformers (/Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/transform/build/ScriptTransformer.js:378:5)
at async createScriptTransformer (/Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/transform/build/ScriptTransformer.js:1106:3)
at async /Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/core/build/TestScheduler.js:269:31
at async Promise.all (index 0)
at async TestScheduler.scheduleTests (/Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/core/build/TestScheduler.js:262:5)
at async runJest (/Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/core/build/runJest.js:387:19)
at async _run10000 (/Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/core/build/cli/index.js:408:7)
at async runCLI (/Users/tiagooliveira/workstation/testandoJesSchematics/node_modules/@jest/core/build/cli/index.js:261:3)

Test Suites: 0 of 2 total
Tests: 0 total
Snapshots: 0 total
Time: 0 s%

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Angular 12 project with --create-application=false
  2. Create a library ... ng g library somelib
  3. Add @briebug/jest-schematic ... ng add @briebug/jest-schematic
  4. Execute tests by command ... ng test

Expected behavior
When the command ng test is execute the tests must run.

Screenshots
Captura de Tela 2021-06-07 às 20 26 42

Desktop (please complete the following information):

  • OS: [e.g. Mac]
  • Node version: [e.g. 14.17.0]
  • NPM or Yarn version [e.g. Yarn 6.14.13]
  • App type [e.g. Angular CLI]
  • Angular version [e.g. @angular/core: "12.0.3"]

Additional context
Add any other context about the problem here.

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

1 participant