We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Adding a decorator from AsyncApi results in the wrong call stack line number for failing tests
To Reproduce Steps to reproduce the behavior:
npx @nestjs/cli@latest new test-call-stack-bug
npm i -D nestjs-asyncapi
@AsyncApi()
AppService
describe('root', () => { it('should return "Hello World!"', () => { expect(appController.getHello()).toBe('Hello World!') }) it('should fail', () => { expect(5).toBe(6) }) })
npm test
● AppController › root › should fail expect(received).toBe(expected) // Object.is equality Expected: 6 Received: 5 18 | describe('root', () => { 19 | it('should return "Hello World!"', () => { > 20 | expect(appController.getHello()).toBe('Hello World!') | ^ 21 | }) 22 | 23 | it('should fail', () => { at Object.<anonymous> (app.controller.spec.ts:20:23)
Expected behavior The failing row is shown correctly (which happens if I remove @AsyncApi() decorator from AppService class):
● AppController › root › should fail expect(received).toBe(expected) // Object.is equality Expected: 6 Received: 5 22 | 23 | it('should fail', () => { > 24 | expect(5).toBe(6) | ^ 25 | }) 26 | }) 27 | }) at Object.<anonymous> (app.controller.spec.ts:24:17)
Environment
Additional context Same thing happens if I add @AsyncApiPub decorator to a method in AppService:
@AsyncApiPub
@Injectable() export class AppService { @AsyncApiPub({ channel: 'test', message: { name: 'test', payload: 'test' } }) getHello(): string { return 'Hello World!' } }
The text was updated successfully, but these errors were encountered:
Hello! Thank you for filing an issue.
If this is a bug report, please include relevant logs to help us debug the problem.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Adding a decorator from AsyncApi results in the wrong call stack line number for failing tests
To Reproduce
Steps to reproduce the behavior:
npx @nestjs/cli@latest new test-call-stack-bug
)npm i -D nestjs-asyncapi
)@AsyncApi()
toAppService
classnpm test
) and notice how the wrong line is marked as the failing one:Expected behavior
The failing row is shown correctly (which happens if I remove
@AsyncApi()
decorator fromAppService
class):Environment
Additional context
Same thing happens if I add
@AsyncApiPub
decorator to a method inAppService
:The text was updated successfully, but these errors were encountered: