Skip to content

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

@tiago-ilha

Description

@tiago-ilha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions