Skip to content

Commit a76968d

Browse files
committed
Tests before pull-request
1 parent 51f91df commit a76968d

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

__tests__/app/charts/DockerChart.test.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('React unit tests', () => {
1414

1515
beforeEach(() => {
1616
const TestComponent = () => {
17-
const { dockerData, setDockerData, fetchDockerData } = useContext(DockerContext);
17+
const { dockerData } = useContext(DockerContext);
1818
const [mockData, setMockData] = useState([
1919
{
2020
containerid: 'f57f5815cb0',
@@ -71,5 +71,13 @@ describe('React unit tests', () => {
7171
it('should display <header> tag with docker stats', () => {
7272
expect(wrapper.find('header').text()).toEqual('Docker Container Stats');
7373
});
74+
75+
it('should display container name, id, platform, and memory usage', () => {
76+
expect(wrapper.find('div').find('span').at(0).text()).toContain('chronos-mon-2');
77+
expect(wrapper.find('div').find('span').at(1).text()).toContain('f57f5815cb0');
78+
expect(wrapper.find('div').find('span').at(2).text()).toContain('Linux');
79+
expect(wrapper.find('div').find('span').at(4).text()).toContain('48.48');
80+
expect(wrapper.find('div').find('span').at(5).text()).toContain('16665.81');
81+
});
7482
});
7583
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
describe('tests for latency chart', () => {
2+
xit('should render plot with latency values', () => {});
3+
});

0 commit comments

Comments
 (0)