Last active
August 29, 2015 14:05
-
-
Save PitBeast/c3df13c26f5cfd04bafd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('statsHeight', function() { | |
| var $compile, | |
| $rootScope, | |
| $timeout; | |
| beforeEach(inject(function (_$compile_, _$rootScope_, _$timeout_){ | |
| $compile = _$compile_; | |
| $rootScope = _$rootScope_; | |
| $timeout = _$timeout_; | |
| })); | |
| it('string length less than 4', function() { | |
| var element = $compile('<dt stats-height="\'93\'" class="\'list_item_description__number\'" ng-bind="\'999\'"></dt>')($rootScope); | |
| $rootScope.$digest(); | |
| $timeout.flush() | |
| expect(element.html().length).toBeLessThan(4); | |
| expect(element.css("font-size")).toEqual("93px"); | |
| }); | |
| it('string length greater than 4', function() { | |
| var element = $compile('<dt stats-height="\'93\'" class="\'list_item_description__number\'" ng-bind="\'999569\'"></dt>')($rootScope); | |
| $rootScope.$digest(); | |
| $timeout.flush() | |
| expect(element.html().length).toBeGreaterThan(4); | |
| expect(element.css("font-size")).toEqual("63px"); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment