Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
chore(tooltip): clean up code style
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleycho committed Sep 14, 2015
1 parent cbf2c0d commit b10a48b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/tooltip/test/tooltip-template.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ describe('tooltip template', function() {

it('should open on mouseenter', inject(function() {
trigger(elm, 'mouseenter');
expect( tooltipScope.isOpen ).toBe( true );
expect(tooltipScope.isOpen).toBe(true);

expect( elmBody.children().length ).toBe( 2 );
expect(elmBody.children().length).toBe(2);
}));

it('should not open on mouseenter if templateUrl is empty', inject(function() {
Expand Down Expand Up @@ -81,4 +81,3 @@ describe('tooltip template', function() {
expect(elmBody.children().length).toBe(1);
}));
});

10 changes: 5 additions & 5 deletions src/tooltip/test/tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ describe('tooltip', function() {
var ttScope;
trigger(elm, 'mouseenter');

ttScope = angular.element( elmBody.children()[1] ).scope();
expect(ttScope.$parent).toBe( tooltipScope );
ttScope = angular.element(elmBody.children()[1]).scope();
expect(ttScope.$parent).toBe(tooltipScope);

trigger(elm, 'mouseleave');

Expand Down Expand Up @@ -388,7 +388,7 @@ describe('tooltip', function() {
});

describe('with an is-open attribute expression', function() {
beforeEach(inject(function ($compile) {
beforeEach(inject(function($compile) {
scope.isOpen = false;
elm = $compile(angular.element(
'<span tooltip="tooltip text" tooltip-is-open="isOpen === true" >Selector Text</span>'
Expand All @@ -412,7 +412,7 @@ describe('tooltip', function() {
describe('with a trigger attribute', function() {
var scope, elmBody, elm, elmScope;

beforeEach( inject( function( $rootScope ) {
beforeEach(inject(function($rootScope) {
scope = $rootScope;
}));

Expand Down Expand Up @@ -591,7 +591,7 @@ describe('tooltipWithDifferentSymbols', function() {
beforeEach(module('template/tooltip/tooltip-popup.html'));

// configure interpolate provider to use [[ ]] instead of {{ }}
beforeEach(module( function($interpolateProvider) {
beforeEach(module(function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.startSymbol(']]');
}));
Expand Down
2 changes: 1 addition & 1 deletion src/tooltip/test/tooltip2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('tooltip directive', function() {
}));

angular.forEach(tooltipTypes, function(html, key) {
describe(key, function () {
describe(key, function() {
describe('placement', function() {
it('can specify an alternative, valid placement', function() {
var fragment = compileTooltip('<span ' + html + ' tooltip-placement="left">Trigger here</span>');
Expand Down

0 comments on commit b10a48b

Please sign in to comment.