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

refactor tests to use Ember Addon Tests #154

Merged
merged 7 commits into from
Nov 9, 2020

Conversation

jelhan
Copy link
Collaborator

@jelhan jelhan commented Nov 4, 2020

This merge requests refactors the test suite to use Ember Addon Tests instead of Ember CLI Addon Tests.

Ember CLI Addon Tests were unstable and slow. CI pipeline was breaking due to small changes in timing and order of tests. Some tests needed to be executed in different processes to prevent leakage. This caused the tests to be sometimes grouped to not break Ember CLI Addon Tests rather than for readability.

Ember Addon Tests could be seen as a modernized rewrite of Ember CLI Addon Tests utilizing yarn workspaces. It should also provide a better performance but I haven't benchmarked.

@@ -105,7 +105,7 @@ module.exports = {
// - application has ember-cli-fastboot dependency.
this._needsFastBootSupport = this._config.enabled &&
this._config.delivery.includes('header') &&
new VersionChecker(this.project).for('ember-cli-fastboot').exists();
this.project.findAddonByName('ember-cli-fastboot') !== null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ember CLI Version Checker does not work well within yarn workspaces. It reports wrongly that a dependency exists if that dependency is installed in the workspace even if it's not a direct nor indirect dependency of the package.

@jelhan jelhan added the internal label Nov 4, 2020
@jelhan
Copy link
Collaborator Author

jelhan commented Nov 4, 2020

@sandstrom This is the pull request that I promised in #100 (comment).

@sandstrom
Copy link
Collaborator

@jelhan Awesome! 💯 🎉

I've looked at the diff and looks great! But I don't have much experience with any of the two test frameworks, so I can't really give any useful feedback or extra pair of eyes 👀. All I could hope to find would be spelling mistakes etc.

@jelhan jelhan changed the title refactor tests to use Ember Addon Tests WIP: refactor tests to use Ember Addon Tests Nov 5, 2020
sudo: false
dist: trusty
dist: xenial
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CI failed due to outdated yarn version. This change is inline with latest addon blueprint.

@jelhan
Copy link
Collaborator Author

jelhan commented Nov 9, 2020

It seems as if one test is still flickering even after using a more recent yarn version:

test support warns if dependencies are not supported warns if QUnit version is to old

Also the tests for Ember CLI beta are failing. But for that version not randomly but constantly.

I can't reproduce either of these issues locally. To be honest I hope they are related to TravisCI.

But even the current situation is better than the one before. Ember CLI addon tests caused the test suite to break apart on nearly every change. This slowed down development dramatically.

If no concerns are raised I will merge this one by the end of today.

@jelhan jelhan changed the title WIP: refactor tests to use Ember Addon Tests refactor tests to use Ember Addon Tests Nov 9, 2020
@jelhan jelhan merged commit 2930b5d into master Nov 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the refactor-to-use-ember-addon-tests branch November 9, 2020 18:24
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.

2 participants