Skip to content

Commit

Permalink
start the line view
Browse files Browse the repository at this point in the history
  • Loading branch information
pghalliday committed May 3, 2018
1 parent c9a667e commit e7df428
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/cli/monitor/ui/types/line/reducer.js
Expand Up @@ -210,7 +210,7 @@ function createReducer(name, type) {
var values = appendValue(series.values, data.value, state.x.length);
var errorSeries = updateErrorSeries(state.errorSeries, data.series, data.error);
return Object.assign({}, state, {
series: Object.assign({}, state.series, _defineProperty({}, payload.series, Object.assign({}, series, {
series: Object.assign({}, state.series, _defineProperty({}, data.series, Object.assign({}, series, {
error: data.error,
values: values
}))),
Expand Down
4 changes: 2 additions & 2 deletions test/src/cli/monitor/ui/types/line/index.js
@@ -1,10 +1,10 @@
import service from '../../../../../../../src/cli/monitor/ui/types/service';
import service from '../../../../../../../src/cli/monitor/ui/types/line';

describe('cli', () => {
describe('monitor', () => {
describe('ui', () => {
describe('types', () => {
describe('service', () => {
describe('line', () => {
it('should expose the createView function', () => {
service.createView.should.be.a('function');
});
Expand Down
11 changes: 6 additions & 5 deletions test/src/cli/monitor/ui/types/line/view.js
@@ -1,21 +1,22 @@
// eslint-disable-next-line max-len
import createView from '../../../../../../../src/cli/monitor/ui/types/service/view';
import Log from '../../../../../../../src/cli/monitor/ui/types/common/view/log';
import createView from '../../../../../../../src/cli/monitor/ui/types/line/view';
// eslint-disable-next-line max-len
import Entry from '../../../../../../../src/cli/monitor/ui/types/common/view/entry';

let view;

describe('cli', () => {
describe('monitor', () => {
describe('ui', () => {
describe('types', () => {
describe('service', () => {
describe('line', () => {
describe('createView', () => {
beforeEach(() => {
view = createView();
});

it('should be a Log', () => {
view.should.be.an.instanceof(Log);
it('should be an Entry', () => {
view.should.be.an.instanceof(Entry);
});
});
});
Expand Down

0 comments on commit e7df428

Please sign in to comment.