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

Commit b7389f5

Browse files
committed
fixes
1 parent 31d31e4 commit b7389f5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

test/ng/compileSpec.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3537,7 +3537,6 @@ describe('$compile', function() {
35373537
owRefAlias: '< owRef',
35383538
owOptref: '<?',
35393539
owOptrefAlias: '<? owOptref',
3540-
owOptreference: '<?',
35413540
owColref: '<*',
35423541
owColrefAlias: '<* owColref',
35433542
expr: '&',
@@ -4134,17 +4133,15 @@ describe('$compile', function() {
41344133
test('null', null);
41354134
test('undefined', undefined);
41364135
test("'someString'", 'someString');
4137-
4136+
test('true', true);
41384137

41394138
function test(literalString, literalValue) {
41404139
compile('<div><span my-component reference="' + literalString + '">');
41414140

41424141
$rootScope.$apply();
41434142
expect(componentScope.reference).toBe(literalValue);
41444143
dealoc(element);
4145-
41464144
}
4147-
41484145
}));
41494146

41504147
});
@@ -4332,7 +4329,7 @@ describe('$compile', function() {
43324329
}));
43334330

43344331

4335-
it('should not throw on non assignable changes', inject(function() {
4332+
it('should not throw on non assignable expressions in the parent', inject(function() {
43364333
compile('<div><span my-component ow-ref="\'hello \' + name">');
43374334
$rootScope.name = 'world';
43384335
$rootScope.$apply();
@@ -4367,7 +4364,8 @@ describe('$compile', function() {
43674364
var isolateScope = element.isolateScope();
43684365
expect(isolateScope.owRef).toBeNaN();
43694366

4370-
$rootScope.$apply(function(scope) { scope.num = 64; });
4367+
$rootScope.num = 64;
4368+
$rootScope.$apply();
43714369
expect(isolateScope.owRef).toBe(64);
43724370
}));
43734371

@@ -4397,23 +4395,24 @@ describe('$compile', function() {
43974395
}));
43984396

43994397

4400-
it('should not complain when the component changes', inject(function() {
4398+
iit('should not complain when the isolated scope changes', inject(function() {
44014399
compile('<div><span my-component ow-ref="{name: name}">');
44024400

44034401
$rootScope.name = 'a';
44044402
$rootScope.$apply();
44054403
componentScope.owRef = {name: 'b'};
44064404
componentScope.$apply();
4405+
44074406
expect(componentScope.owRef).toEqual({name: 'b'});
44084407
expect($rootScope.name).toBe('a');
44094408
}));
44104409

4411-
4412-
it('should work for primitive literals', inject(function() {
4410+
iit('should work for primitive literals', inject(function() {
44134411
test('1', 1);
44144412
test('null', null);
44154413
test('undefined', undefined);
44164414
test("'someString'", 'someString');
4415+
test('true', true);
44174416

44184417
function test(literalString, literalValue) {
44194418
compile('<div><span my-component ow-ref="' + literalString + '">');
@@ -4446,7 +4445,6 @@ describe('$compile', function() {
44464445

44474446
expect(componentScope.owOptref).toBe(undefined);
44484447
expect(componentScope.owOptrefAlias).toBe(undefined);
4449-
expect(componentScope.owOptreference).toBe(undefined);
44504448
}));
44514449
});
44524450

0 commit comments

Comments
 (0)