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
26f709e8
Commit
26f709e8
authored
Jul 27, 2018
by
Tobias Skarhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Karm to Jest
parent
715c82b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
public/app/plugins/panel/heatmap/specs/heatmap_ctrl.jest.ts
+24
-20
No files found.
public/app/plugins/panel/heatmap/specs/heatmap_ctrl
_specs
.ts
→
public/app/plugins/panel/heatmap/specs/heatmap_ctrl
.jest
.ts
View file @
26f709e8
import
{
describe
,
beforeEach
,
it
,
expect
,
angularMocks
}
from
'../../../../../test/lib/common'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
HeatmapCtrl
}
from
'../heatmap_ctrl'
;
import
{
HeatmapCtrl
}
from
'../heatmap_ctrl'
;
import
helpers
from
'../../../../../test/specs/helpers'
;
describe
(
'HeatmapCtrl'
,
function
()
{
describe
(
'HeatmapCtrl'
,
function
()
{
var
ctx
=
new
helpers
.
ControllerTestContext
()
;
let
ctx
=
<
any
>
{}
;
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
let
$injector
=
{
beforeEach
(
angularMocks
.
module
(
'grafana.controllers'
));
get
:
()
=>
{}
beforeEach
(
};
angularMocks
.
module
(
function
(
$compileProvider
)
{
$compileProvider
.
preAssignBindingsEnabled
(
true
);
})
);
beforeEach
(
ctx
.
providePhase
());
let
$scope
=
{
beforeEach
(
ctx
.
createPanelController
(
HeatmapCtrl
));
$on
:
()
=>
{},
beforeEach
(()
=>
{
events
:
{
ctx
.
ctrl
.
annotationsPromise
=
Promise
.
resolve
({});
on
:
()
=>
{}
ctx
.
ctrl
.
updateTimeRange
();
}
});
};
HeatmapCtrl
.
prototype
.
panel
=
{
events
:
{
on
:
()
=>
{},
emit
:
()
=>
{}
}
};
beforeEach
(()
=>
{
ctx
.
ctrl
=
new
HeatmapCtrl
(
$scope
,
$injector
,
{});
});
describe
(
'when time series are outside range'
,
function
()
{
describe
(
'when time series are outside range'
,
function
()
{
beforeEach
(
function
()
{
beforeEach
(
function
()
{
...
@@ -36,7 +40,7 @@ describe('HeatmapCtrl', function() {
...
@@ -36,7 +40,7 @@ describe('HeatmapCtrl', function() {
});
});
it
(
'should set datapointsOutside'
,
function
()
{
it
(
'should set datapointsOutside'
,
function
()
{
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
.
b
e
(
'Data points outside time range'
);
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
B
e
(
'Data points outside time range'
);
});
});
});
});
...
@@ -61,7 +65,7 @@ describe('HeatmapCtrl', function() {
...
@@ -61,7 +65,7 @@ describe('HeatmapCtrl', function() {
});
});
it
(
'should set datapointsOutside'
,
function
()
{
it
(
'should set datapointsOutside'
,
function
()
{
expect
(
ctx
.
ctrl
.
dataWarning
).
to
.
b
e
(
null
);
expect
(
ctx
.
ctrl
.
dataWarning
).
to
B
e
(
null
);
});
});
});
});
...
@@ -72,7 +76,7 @@ describe('HeatmapCtrl', function() {
...
@@ -72,7 +76,7 @@ describe('HeatmapCtrl', function() {
});
});
it
(
'should set datapointsCount warning'
,
function
()
{
it
(
'should set datapointsCount warning'
,
function
()
{
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
.
b
e
(
'No data points'
);
expect
(
ctx
.
ctrl
.
dataWarning
.
title
).
to
B
e
(
'No data points'
);
});
});
});
});
});
});
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