Skip to content

Commit

Permalink
update mock
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed May 23, 2024
1 parent 10f6400 commit f172f45
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/renderStream.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import type {EChartsOption} from 'echarts';
import fs from 'node:fs';
import fs, {readFile} from 'node:fs';

import {ConfigService} from 'app/config';
import {renderStream} from 'app/renderStream';
import {RenderData} from 'app/types';

jest.mock('node:fs');

jest.mock('node:fs', () => {
return {
...jest.requireActual('node:fs'),
readFile: jest.fn(),
};
});

describe('renderStream', () => {
it('can render graphs given a valid config and render data', async () => {
const config = new ConfigService('./example');
Expand Down

0 comments on commit f172f45

Please sign in to comment.