Fakultas Ilmu Komputer UI

Commit 5fe31b52 authored by Doan Andreas Nathanael's avatar Doan Andreas Nathanael
Browse files

[RED] added test for client list admin

parent 95530f9f
import React from 'react'; import React from 'react';
import { render } from 'utils/testing'; import { render } from 'utils/testing';
import * as ROUTES from 'constants/routes'; import * as ROUTES from 'constants/routes';
import axios from 'axios';
import ClientListAdmin from '.'; import ClientListAdmin from '.';
jest.mock('axios');
const mockAxios = axios as jest.Mocked<typeof axios>;
describe('ClientListAdmin', () => { describe('ClientListAdmin', () => {
it('renders correctly', () => { it('renders correctly', async () => {
mockAxios.request.mockImplementationOnce(() =>
Promise.resolve({
status: 200,
data: [],
}),
);
render(<ClientListAdmin />, ROUTES.clientListForAdmin); render(<ClientListAdmin />, ROUTES.clientListForAdmin);
}); });
}); });
Supports Markdown
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