-
Notifications
You must be signed in to change notification settings - Fork 23
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
[BREAKING] Make namespace mandatory for application and library projects #430
Conversation
BREAKING CHANGE: UI5 Project must be able to determine the project's namespace, otherwise an error is thrown.
BREAKING CHANGE: UI5 Project must be able to determine the project's namespace, otherwise an error is thrown.
To increase the test coverage again
To increase the test coverage again
getNamespace: from manifest.json with not matching file path
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.
Looks good 👍
Please use squash and merge on GitHub to merge this into the master as a single commit
Actually, since @matz3 is owner of the UI5 Builder, let's wait for his review as well
@@ -284,6 +284,21 @@ test("getDotLibrary: reads correctly", async (t) => { | |||
t.deepEqual(fsPath, expectedPath, ".library fsPath is correct"); | |||
}); | |||
|
|||
test("getDotLibrary: reads correctly call again", async (t) => { |
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.
What is this testing exactly? The caching mechanism inside getDotLibrary
?
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.
Yes
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.
But if I remove the caching here:
ui5-builder/lib/types/library/LibraryFormatter.js
Lines 243 to 245 in 7773b4e
if (this._pDotLibrary) { | |
return this._pDotLibrary; | |
} |
The test will still be successful because it doesn't actually test whether something got cached (e.g. no second glob call).
Also, there is already tests for this. It just seem to be incorrect since its missing a second call:
test.serial("getDotLibrary: result is cached", async (t) => { |
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.
exactly
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.
exactly
...
So we gonna fix the existing test instead?
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.
👍
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.
Please merge using "squash and merge"
Tests are failing due to SAP/ui5-builder#430 Adopt tests to provide necessary manifest.json files and expect the corresponding namespace information.
Tests are failing due to SAP/ui5-builder#430 Adopt tests fixture to provide necessary manifest.json file.
Tests are failing due to SAP/ui5-builder#430 Adopt tests to provide necessary manifest.json files and expect the corresponding namespace information.
Tests are failing due to SAP/ui5-builder#430 Adopt tests fixture to provide necessary manifest.json file.
Tests are failing due to SAP/ui5-builder#430 Adopt tests to provide necessary manifest.json files and expect the corresponding namespace information.
BREAKING CHANGE:
UI5 Project must be able to determine the project's namespace,
otherwise an error is thrown.