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

Added tests and refactored code (Part 3) #5

Merged
merged 14 commits into from
Jan 19, 2023
Merged

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Jan 19, 2023

Description

I added tests for the following steps:

  • moveTestAppFiles
  • moveProjectRootFiles
  • createFilesFromBlueprint

In addition, I created test fixtures to thoroughly (and more easily) test useRelativePaths and createFilesFromBlueprint. For createFilesFromBlueprint, where we use evaluations and interpolations to dynamically create files, it's important that we check the file content under various conditions. Note how, in commit 10, we could catch and remove the extra new lines that had been added to _addonLocation__/unpublished-development-types/index.d.ts by mistake.

By laying the foundation for testing a step against test fixtures, we will be able to rigorously test updateAddonPackageJson, updateAddonTsconfigJson, updateTestAppPackageJson, and updateTestAppTsconfigJson in the next pull request.

@ijlee2 ijlee2 added bug Something isn't working enhance: documentation Issue asks for better documentation (e.g. README, code, tests) labels Jan 19, 2023
@ijlee2 ijlee2 marked this pull request as ready for review January 19, 2023 15:34
@ijlee2 ijlee2 merged commit 374c142 into main Jan 19, 2023
@ijlee2 ijlee2 deleted the refactor-code-part-3 branch January 19, 2023 15:34
Comment on lines +3 to +4
<% if (options.packages.addon.hasGlint) { %>
import '@glint/environment-ember-loose';
Copy link
Owner Author

Choose a reason for hiding this comment

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

bugfix

Incorrect spacings.

@@ -16,7 +16,7 @@
"prepare": "npm run build",
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "npm start --workspace <%= options.packages.addon.name %>",
"start:tests": "npm start --workspace <%= options.packages.testApp.name %>",
"start:test-app": "npm start --workspace <%= options.packages.testApp.name %>",
Copy link
Owner Author

Choose a reason for hiding this comment

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

bugfix

Incorrect/inconsistent script names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhance: documentation Issue asks for better documentation (e.g. README, code, tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant