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

Duplicate utils.js code in integration-test and parcel-bundler. #2604

Closed
sainthkh opened this issue Jan 31, 2019 · 1 comment
Closed

Duplicate utils.js code in integration-test and parcel-bundler. #2604

sainthkh opened this issue Jan 31, 2019 · 1 comment

Comments

@sainthkh
Copy link
Contributor

❔ Question

The codes in /integration-test/test/utils.js and /parcel-bundler/test/utils.js are identical without the first line that requires Bundler.

And test-utils module has only one function sleep. Isn't it better to merge these 2 files into test-utils?

🔦 Context

When I was writing code for #2590, I first added my error message function symlinkPrivilegeWarning() function to one of that file and added it to one of them. And tests failed.

I realized that they were identical. So, I added the function to utils. Then, I realized that there was test-utils after a comment. And moved symlinkPrivilegeWarning() to that folder.

But this made me think to merge those 2 duplicated files into one file in test-utils.

I want your opinion. If you say yes, I'll make a PR about this.

💻 Code Sample

None.

🌍 Your Environment

Unrelated.

@DeMoorJasper
Copy link
Member

I think the goal is to get as much test utils as possible into test-utils so we don’t have too much duplicate code and plugins can just do integration tests with the same package we use internally

Sent with GitHawk

sainthkh added a commit to sainthkh/parcel that referenced this issue Feb 1, 2019
DeMoorJasper pushed a commit that referenced this issue Feb 3, 2019
#2605)

* Ignore Kotlin tests and show messages when Java is not installed or configured. (#2603)

* Skip symlink tests and show warning message when tests are run without admin privilege. (#2602)

* Moved parcel-bundler/test/utils.js and integration-tests/test/utils.js into test-utils/src/utils.js. (#2604)

* Fixed eslint errors.

* Use the test to assert this.child.killed rather than checking time difference. (#2609) (#2612)
@sainthkh sainthkh closed this as completed Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants