Skip to content

Test Suite 'commands - migration generate' exits tests prematurely #10360

@edosrecki

Description

@edosrecki

Issue description

Tests suite 'commands - migration generate' exits tests prematurely due to process.exit(0) call in the code.

Expected Behavior

I expect all three tests in commands - migration generate suite to fully execute with either success/fail, and the rest of tests to continue executing after it.

Actual Behavior

The test process exits with status 0, before finishing running all the tests. This happens due to process.exit(0) call in MigrationGenerateCommand#handler:

Steps to reproduce

npm test

My Environment

Dependency Version
Operating System MacOS 11.6
Node.js version 16.20
Typescript version 4.9.5
TypeORM version master

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, but I don't know how to start. I would need guidance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions