Add first test

This commit is contained in:
Ryan Gossiaux
2021-12-25 01:18:22 -08:00
parent 740d91ab06
commit 237236f8d7

View File

@@ -0,0 +1,15 @@
import { render } from "@testing-library/svelte";
import TestRenderer from "../../test-utils/TestRenderer.svelte";
import { Switch } from ".";
jest.mock('../../hooks/use-id')
describe('Safe guards', () => {
it('should be possible to render a Switch without crashing', () => {
render(TestRenderer, {
allProps: [
Switch,
{ checked: false, onChange: console.log }
]
});
})
})