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

refactor: add tests for old api #622

Merged
merged 2 commits into from
Sep 22, 2022

Conversation

magicmatatjahu
Copy link
Member

Description

  • add tests for old api
  • fix found bugs in old and new api

cc @smoya

Related issue(s)
Part of #481
Part of #482

@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@@ -39,7 +39,7 @@ export enum SchemaTypesToIterate {

export type TraverseOptions = {
callback: TraverseCallback
schemaTypesToIterate: SchemaTypesToIterate[]
schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm lost on this 😆 Is this the preferable way? Or it was a bug?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an interpolation of enum values as union. Feature in the TS 4.1, so you can put schemaTypesToIterate as array of normal string (but with values from enum) or SchemaTypesToIterate signature for given enum value.

Copy link
Member

@smoya smoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀🌔

@magicmatatjahu
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 103fcb6 into asyncapi:next-major Sep 22, 2022
@magicmatatjahu magicmatatjahu deleted the next/old-api-tests branch September 22, 2022 10:46
magicmatatjahu added a commit to magicmatatjahu/parser-js that referenced this pull request Oct 3, 2022
derberg pushed a commit that referenced this pull request Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants