briebug / jest-schematic

Angular schematic for adding Jest and the required files to an Angular CLI project
MIT License
322 stars 38 forks source link

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

Open tiago-ilha opened 3 years ago

tiago-ilha commented 3 years ago

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):

Additional context Add any other context about the problem here.