Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 6c86af5

Browse files
committed
test(ng-class): Make the ng-class tests compiler agnostic
A better place for this logic may be JQuery. See #759
1 parent 81030dd commit 6c86af5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/directive/ng_class_spec.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,17 @@ main() {
134134
_.rootScope.apply();
135135
_.rootScope.context['dynCls'] = 'foo';
136136
_.rootScope.apply();
137-
expect(element.className).toEqual('ui-panel ui-selected foo');
137+
// TODO(deboer): Abstract ng-binding
138+
expect(element.className.replaceAll(' ng-binding', '')).toEqual('ui-panel ui-selected foo');
138139
});
139140

140141

141142
it('should not add duplicate classes', () {
142143
var element = _.compile('<div class="panel bar" ng-class="dynCls"></div>');
143144
_.rootScope.context['dynCls'] = 'panel';
144145
_.rootScope.apply();
145-
expect(element.className).toEqual('panel bar');
146+
// TODO(deboer): Abstract ng-binding
147+
expect(element.className.replaceAll(' ng-binding', '')).toEqual('panel bar');
146148
});
147149

148150

@@ -152,7 +154,8 @@ main() {
152154
_.rootScope.apply();
153155
_.rootScope.context['dynCls'] = 'window';
154156
_.rootScope.apply();
155-
expect(element.className).toEqual('bar window');
157+
// TODO(deboer): Abstract ng-binding
158+
expect(element.className.replaceAll(' ng-binding', '')).toEqual('bar window');
156159
});
157160

158161

0 commit comments

Comments
 (0)