FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-date-range/test/angular-date-range_Spec.js at master · DevLab2425/angular-date-range · GitHub
DevLab2425
/
angular-date-range
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular-date-range
/
test
/
angular-date-range_Spec.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (31 loc) · 975 Bytes
Breadcrumbs
angular-date-range
/
test
/
angular-date-range_Spec.js
Copy path
File metadata and controls
41 lines (31 loc) · 975 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
describe
(
'Angular Date Range Directive'
,
function
(
)
{
var
$scope
,
$compile
;
var
baseTemplate
=
'<date-range></date-range>'
;
beforeEach
(
module
(
'date-range'
)
)
;
beforeEach
(
inject
(
function
(
$rootScope
,
_$compile_
)
{
$scope
=
$rootScope
.
$new
(
)
;
$compile
=
_$compile_
;
}
)
)
;
function
compileDirective
(
template
,
scope
)
{
var
elm
=
angular
.
element
(
template
)
;
$compile
(
elm
)
(
scope
)
;
scope
.
$apply
(
)
;
return
elm
;
}
describe
(
'Default Dates'
,
function
(
)
{
var
elm
;
beforeEach
(
function
(
)
{
elm
=
compileDirective
(
baseTemplate
,
$scope
)
;
}
)
;
it
(
'should display January only once '
,
function
(
)
{
expect
(
elm
.
text
(
)
)
.
toContain
(
'January'
)
;
expect
(
elm
.
text
(
)
.
indexOf
(
'January'
)
)
.
toBe
(
0
)
;
}
)
;
it
(
'should display the date span as 1 - 31'
,
function
(
)
{
expect
(
elm
.
text
(
)
)
.
toContain
(
'1 - 31'
)
;
}
)
;
it
(
'should display a condensed date "January 1 - 31, 1970"'
,
function
(
)
{
expect
(
elm
.
text
(
)
)
.
toBe
(
'January 1 - 31, 1970'
)
;
}
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL