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
42ba0dc7
Commit
42ba0dc7
authored
Jul 03, 2018
by
Tobias Skarhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Karma to Jest: Cloudwatch datasource
parent
d4bd5213
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
public/app/plugins/datasource/cloudwatch/specs/datasource.jest.ts
+0
-0
public/test/specs/helpers.ts
+18
-0
No files found.
public/app/plugins/datasource/cloudwatch/specs/datasource
_specs
.ts
→
public/app/plugins/datasource/cloudwatch/specs/datasource
.jest
.ts
View file @
42ba0dc7
This diff is collapsed.
Click to expand it.
public/test/specs/helpers.ts
View file @
42ba0dc7
...
...
@@ -195,6 +195,24 @@ export function TemplateSrvStub() {
};
}
export
function
jestTimeSrvStub
()
{
this
.
init
=
jest
.
fn
();
this
.
time
=
{
from
:
'now-1h'
,
to
:
'now'
};
this
.
timeRange
=
jest
.
fn
(
parse
=>
{
if
(
parse
===
false
)
{
return
this
.
time
;
}
return
{
from
:
dateMath
.
parse
(
this
.
time
.
from
,
false
),
to
:
dateMath
.
parse
(
this
.
time
.
to
,
true
),
};
});
this
.
replace
=
jest
.
fn
(
target
=>
target
);
this
.
setTime
=
jest
.
fn
(
time
=>
{
this
.
time
=
time
;
});
}
var
allDeps
=
{
ContextSrvStub
,
TemplateSrvStub
,
...
...
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