Implement testing library (#2)
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:
Siklos 2022-08-03 08:45:16 -04:00
parent 081d65b62b
commit 1f1babe49f
10 changed files with 2722 additions and 6 deletions

View 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();
});
});