Add first test
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/lib/components/switch/switch.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/lib/components/switch/switch.test.ts
									
									
									
									
									
										Normal 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 } | ||||
|       ] | ||||
|     }); | ||||
|   }) | ||||
| }) | ||||
		Reference in New Issue
	
	Block a user
	 Ryan Gossiaux
					Ryan Gossiaux