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

test(toml): improve test coverage #4211

Merged
merged 3 commits into from Jan 17, 2024
Merged

test(toml): improve test coverage #4211

merged 3 commits into from Jan 17, 2024

Conversation

babiabeo
Copy link
Contributor

Related: #3713

@babiabeo babiabeo requested a review from kt3k as a code owner January 16, 2024 11:47
@github-actions github-actions bot added the toml label Jan 16, 2024
@@ -894,7 +894,7 @@ export function ParserFactory<T>(parser: ParserComponent<T>) {
if (count > line.length) {
count -= line.length + 1;
} else {
return count;
break;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I use break here because subStr.split("\n") always returns a non-empty array. Therefore, the for loop is always called, which makes the line 900 unreachable.

toml/test.ts Outdated Show resolved Hide resolved
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@kt3k kt3k merged commit ebe17ad into denoland:main Jan 17, 2024
12 checks passed
@babiabeo babiabeo deleted the improve-toml-cov branch January 17, 2024 03:40
@babiabeo babiabeo mentioned this pull request Jan 19, 2024
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants