Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
e46814ba
Commit
e46814ba
authored
Nov 08, 2017
by
Mitsuhiro Tanda
Committed by
Torkel Ödegaard
Nov 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix date test (#9811)
parent
799aaf72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
public/app/core/specs/datemath.jest.ts
+1
-1
public/app/core/specs/kbn.jest.ts
+1
-1
No files found.
public/app/core/specs/datemath.jest.ts
View file @
e46814ba
...
@@ -48,7 +48,7 @@ describe("DateMath", () => {
...
@@ -48,7 +48,7 @@ describe("DateMath", () => {
it
(
"now/d on a utc dashboard should be start of the current day in UTC time"
,
()
=>
{
it
(
"now/d on a utc dashboard should be start of the current day in UTC time"
,
()
=>
{
var
today
=
new
Date
();
var
today
=
new
Date
();
var
expected
=
new
Date
(
Date
.
UTC
(
today
.
get
FullYear
(),
today
.
getMonth
(),
today
.
get
Date
(),
0
,
0
,
0
,
0
));
var
expected
=
new
Date
(
Date
.
UTC
(
today
.
get
UTCFullYear
(),
today
.
getUTCMonth
(),
today
.
getUTC
Date
(),
0
,
0
,
0
,
0
));
var
startOfDay
=
dateMath
.
parse
(
'now/d'
,
false
,
'utc'
).
valueOf
();
var
startOfDay
=
dateMath
.
parse
(
'now/d'
,
false
,
'utc'
).
valueOf
();
expect
(
startOfDay
).
toBe
(
expected
.
getTime
());
expect
(
startOfDay
).
toBe
(
expected
.
getTime
());
...
...
public/app/core/specs/kbn.jest.ts
View file @
e46814ba
...
@@ -114,7 +114,7 @@ describe('date time formats', function() {
...
@@ -114,7 +114,7 @@ describe('date time formats', function() {
it
(
'should format as US date'
,
function
()
{
it
(
'should format as US date'
,
function
()
{
var
str
=
kbn
.
valueFormats
.
dateTimeAsUS
(
1505634997920
,
1
);
var
str
=
kbn
.
valueFormats
.
dateTimeAsUS
(
1505634997920
,
1
);
expect
(
str
).
toBe
(
moment
(
1505634997920
).
format
(
'MM/DD/YYYY
H
:mm:ss a'
));
expect
(
str
).
toBe
(
moment
(
1505634997920
).
format
(
'MM/DD/YYYY
h
:mm:ss a'
));
});
});
it
(
'should format as US date and skip date when today'
,
function
()
{
it
(
'should format as US date and skip date when today'
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment