Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91c2c2f
commit 6bb010d
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use strict"; | ||
|
||
describe("snNumberString", function() { | ||
var scope, rootScope, filter; | ||
|
||
beforeEach(module("thisissoon.nav")); | ||
|
||
beforeEach(inject(function ($rootScope, $filter, $injector) { | ||
scope = $rootScope.$new(); | ||
|
||
rootScope = $rootScope; | ||
|
||
filter = $filter("snNumberString"); | ||
|
||
})); | ||
|
||
it("should return test representation of numbers between 1 and 10", function(){ | ||
|
||
var numberStrings = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]; | ||
|
||
for(var i = 1; i<=10; i++){ | ||
var result = filter(i); | ||
expect(result).toEqual(numberStrings[i]); | ||
} | ||
}); | ||
|
||
}); |