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

[bug] class constructor usage in test fails #183

Closed
unmyke opened this issue Mar 11, 2021 · 2 comments · Fixed by #184
Closed

[bug] class constructor usage in test fails #183

unmyke opened this issue Mar 11, 2021 · 2 comments · Fixed by #184
Assignees
Labels
bug Something isn't working

Comments

@unmyke
Copy link
Contributor

unmyke commented Mar 11, 2021

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

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

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

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

yarn test packages/nestjs-tinkoff
  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.<anonymous> (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.
@unmyke unmyke added the bug Something isn't working label Mar 11, 2021
@unmyke unmyke changed the title [bug] class constructor usage fails [bug] class constructor usage in test fails Mar 11, 2021
@talentumtuum
Copy link
Contributor

закрыто #184

@TorinAsakura
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants