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(core/utils): Convert to ES modules #2159

Merged
merged 7 commits into from
Apr 20, 2020
Merged

Conversation

stephenmathieson
Copy link
Member

@stephenmathieson stephenmathieson commented Apr 9, 2020

Ref #2120

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker
Copy link
Contributor

straker commented Apr 15, 2020

I had to comment out most of the tests in axe._load as they were heavily mocking but there's not really any outputs to test against. We'll have to figure out how to do this when the entire project (including tests) are converted to es modules.

@straker straker requested a review from WilcoFiers April 15, 2020 14:56
@straker straker marked this pull request as ready for review April 15, 2020 14:58
@straker straker requested a review from a team as a code owner April 15, 2020 14:58
@straker straker changed the title refactor(core/utils): Convert to ES modules [WIP] refactor(core/utils): Convert to ES modules Apr 15, 2020
@@ -1,10 +0,0 @@
describe('utils', function() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Very glad to see this going away.

Copy link
Member Author

@stephenmathieson stephenmathieson left a comment

Choose a reason for hiding this comment

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

Steve's changes LGTM. Please review @WilcoFiers

var comingOut = axe.utils.finalizeRuleResult(goingIn);

assert.equal(goingIn, comingOut);
});

it('passes the nodes property to utils.aggregateNodeResults', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed these are bad tests, but I'd feel much better if we replaced it instead of just taking it out.

});

describe('given command rules', function() {
describe.skip('given command rules', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should disable / skip the tests that are in here. Let's fix them.

@@ -107,7 +107,7 @@ describe('axe.utils.preload integration test', function() {
});
});

it('returns NO preloaded CSSOM assets when requested stylesheet does not exist`', function(done) {
it.skip('returns NO preloaded CSSOM assets when requested stylesheet does not exist`', function(done) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Either remove the test of fix them. If we leave them in this state we might never going to turn them back on.

});
});

describe.skip('frame-wait-time option', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix them or take them out.

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Apr 17, 2020

Alternative to turning these test back on, let me know how we're going to make sure they will get turned back on before the next release.

@straker
Copy link
Contributor

straker commented Apr 17, 2020

Issue for resolving the tests at a later time before a release #2168

Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

An issue was opened for us to resolve the tech debt later.

@WilcoFiers WilcoFiers mentioned this pull request Apr 20, 2020
2 tasks
@straker straker merged commit e8eec73 into develop Apr 20, 2020
@straker straker deleted the core-utils-modules branch April 20, 2020 13:53
stephenmathieson added a commit that referenced this pull request Apr 20, 2020
* develop:
  refactor(core/utils): Convert to ES modules (#2159)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants