Implement testing library (#2)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Eric NGUYEN <enguyen@techform.fr> Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/2
This commit is contained in:
parent
081d65b62b
commit
1f1babe49f
10 changed files with 2722 additions and 6 deletions
19
src/Components/Sidebar/Sidebar.test.tsx
Normal file
19
src/Components/Sidebar/Sidebar.test.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
import * as React from 'react';
|
||||
import { describe, test, expect } from 'vitest';
|
||||
import { render, screen } from '../../utils/test-utils';
|
||||
import Sidebar from './Sidebar';
|
||||
|
||||
describe('Sidebar test', () => {
|
||||
test('Start empty', () => {
|
||||
render(
|
||||
<Sidebar
|
||||
componentOptions={[]}
|
||||
isOpen={true}
|
||||
onClick={() => {}}
|
||||
buttonOnClick={() => {}}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(screen.getByText(/Components/i)).toBeDefined();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue