stackdriver: fix failing tests

This commit is contained in:
Erik Sundell
2018-10-18 16:45:46 +02:00
parent d1740f090a
commit 0f0763b6b8

View File

@@ -235,8 +235,8 @@ describe('StackdriverDataSource', () => {
beforeEach(() => {
res = ds.resolvePanelUnitFromTargets([{ unit: 'megaseconds' }]);
});
it('should return none', () => {
expect(res).toEqual('none');
it('should return undefined', () => {
expect(res).toBeUndefined();
});
});
describe('and the stackdriver unit has a corresponding grafana unit', () => {
@@ -262,16 +262,16 @@ describe('StackdriverDataSource', () => {
beforeEach(() => {
res = ds.resolvePanelUnitFromTargets([{ unit: 'megaseconds' }, { unit: 'megaseconds' }]);
});
it('should return the default value - none', () => {
expect(res).toEqual('none');
it('should return the default value of undefined', () => {
expect(res).toBeUndefined();
});
});
describe('and all target units are not the same', () => {
beforeEach(() => {
res = ds.resolvePanelUnitFromTargets([{ unit: 'bit' }, { unit: 'min' }]);
});
it('should return the default value - none', () => {
expect(res).toEqual('none');
it('should return the default value of undefined', () => {
expect(res).toBeUndefined();
});
});
});