Commit 9e61cacd by Torkel Ödegaard

tests: found the unhandled promise issue in the dash import tests

parent b228c23d
......@@ -53,9 +53,10 @@ describe('DashImportCtrl', function() {
// setup api mock
backendSrv.get = sinon.spy(() => {
return Promise.resolve({
json: {}
});
});
ctx.ctrl.checkGnetDashboard();
return ctx.ctrl.checkGnetDashboard();
});
it('should call gnet api with correct dashboard id', function() {
......@@ -69,9 +70,10 @@ describe('DashImportCtrl', function() {
// setup api mock
backendSrv.get = sinon.spy(() => {
return Promise.resolve({
json: {}
});
});
ctx.ctrl.checkGnetDashboard();
return ctx.ctrl.checkGnetDashboard();
});
it('should call gnet api with correct dashboard id', function() {
......
......@@ -21,7 +21,7 @@ angular.module('grafana.directives', []);
angular.module('grafana.filters', []);
angular.module('grafana.routes', ['ngRoute']);
const context = (<any>require).context('../', true, /specs/);
const context = (<any>require).context('../', true, /specs\.(tsx?|js)/);
for (let key of context.keys()) {
context(key);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment