-
Notifications
You must be signed in to change notification settings - Fork 6
Add unit tests for PubspecYamlUtil #192
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
base: main
Are you sure you want to change the base?
Conversation
Adds `PubspecYamlUtilTest` to verify pubspec parsing and file identification. Coverage verified using the Kover Gradle plugin. Coverage Improvement: - `PubspecYamlUtil`: ~66% line coverage (33 covered, 17 uncovered).
|
|
||
| public void testGetDartProjectName() { | ||
| myFixture.addFileToProject("pubspec.yaml", "name: my_project\n"); | ||
| final VirtualFile pubspec = myFixture.findFileInTempDir("pubspec.yaml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the PUBSPEC_YAML constant here and below?
| public class PubspecYamlUtilTest extends DartCodeInsightFixtureTestCase { | ||
|
|
||
| public void testGetDartProjectName() { | ||
| myFixture.addFileToProject("pubspec.yaml", "name: my_project\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing newline?
| @@ -0,0 +1,33 @@ | |||
| package com.jetbrains.lang.dart.util; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright?
| } | ||
|
|
||
| public void testFindPubspecYamlFile() { | ||
| myFixture.addFileToProject("pubspec.yaml", "name: my_project\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That pesky newline again! :D
|
Add the AI-assisted label? |
Adds
PubspecYamlUtilTestto verify pubspec parsing and file identification. Coverage verified using the Kover Gradle plugin.Coverage Improvement:
PubspecYamlUtil: ~66% line coverage (33 covered, 17 uncovered).