Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(angularFiles): add missing files #14314

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions angularFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ var angularFiles = {
'test/auto/*.js',
'test/ng/**/*.js',
'test/ngAnimate/*.js',
'test/ngMessageFormat/*.js',
'test/ngMessages/*.js',
'test/ngCookies/*.js',
'test/ngResource/*.js',
Expand Down Expand Up @@ -208,7 +209,9 @@ var angularFiles = {
'test/modules/no_bootstrap.js',
'src/ngScenario/browserTrigger.js',
'test/helpers/*.js',
'test/ngAnimate/*.js',
'test/ngMessageFormat/*.js',
'test/ngMessages/*.js',
'test/ngMock/*.js',
'test/ngCookies/*.js',
'test/ngRoute/**/*.js',
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/matchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ beforeEach(function() {
};
var classes = clazz.trim().split(/\s+/);
for (var i = 0; i < classes.length; ++i) {
if (!jqLiteHasClass(actual[0], classes[i])) {
if (!angular.element(actual[0]).hasClass(classes[i])) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this is a bit heavier than calling jqLiteHasClass directly, so it might make the tests run slower.

Copy link
Member

Choose a reason for hiding this comment

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

It seems that actual is already a jqLite/jQuery element. We could probably do actual.hasClass()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't the identity of atual depend on what is passed to expect?

Copy link
Member

Choose a reason for hiding this comment

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

Yes. actual is what we pass to expect.

return { pass: isNot };
}
}
Expand Down
4 changes: 4 additions & 0 deletions test/ngMessages/messagesSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ describe('ngMessages', function() {
return str.replace(/\s+/g,'');
}

function trim(value) {
return isString(value) ? value.trim() : value;
}

var element;
afterEach(function() {
dealoc(element);
Expand Down