atls / nestjs

NestJS Custom Workshop
BSD 3-Clause "New" or "Revised" License
33 stars 8 forks source link

[bug] class constructor usage in test fails #183

Closed unmyke closed 3 years ago

unmyke commented 3 years ago

Описание бага

  1. @atlantis-lab/nestjs-tinkoff@2.0.16
  2. Падение при запуске теста

Воспроизведение

Шаги для воспроизведения бага:

yarn test packages/nestjs-tinkoff ```console yarn run v1.22.5 $ mctl test ts-jest[versions] (WARN) Version 24.9.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=26.0.0 <27.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions. ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead ts-jest[versions] (WARN) Version 24.9.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=26.0.0 <27.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions. ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead ts-jest[versions] (WARN) Version 24.9.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=26.0.0 <27.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions. ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead ts-jest[versions] (WARN) Version 24.9.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=26.0.0 <27.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions. ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead FAIL packages/nestjs-tinkoff/__tests__/request-verifier-guard.test.ts ● Test suite failed to run TypeError: Class constructor Tinkoff cannot be invoked without 'new' 8 | export class TinkoffService extends Tinkoff { 9 | public constructor(@Inject(TINKOFF_API_OPTIONS) options: TinkoffPublicOptions) { > 10 | super(options) | ^ 11 | } 12 | } 13 | at new TinkoffService (packages/nestjs-tinkoff/src/services/tinkoff.service.ts:10:5) at Object. (packages/nestjs-tinkoff/__tests__/request-verifier-guard.test.ts:3:21) PASS packages/nestjs-map-errors-interceptor/__tests__/interceptor.test.ts PASS packages/server-scripts/__tests__/create-webpack-config.test.ts PASS packages/nestjs-signed-url/__tests__/generate-url.test.ts Test Suites: 1 failed, 3 passed, 4 total Tests: 6 passed, 6 total Snapshots: 0 total Time: 1.567s, estimated 2s Ran all test suites. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```
talentumtuum commented 3 years ago

закрыто https://github.com/Atlantis-Lab/nestjs/pull/184

TorinAsakura commented 3 years ago

@tuogeniy Нет смысла писать коммент, просто справа (в сайдбаре) добавляй ПР и указывай таски в коммите