| 
									
										
										
										
											2020-06-09 17:49:41 +02:00
										 |  |  | import React from "react"; | 
					
						
							|  |  |  | import ReactDom from 'react-dom' | 
					
						
							|  |  |  | import Tag from './Tag' | 
					
						
							| 
									
										
										
										
											2020-06-09 20:10:26 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-09 17:49:41 +02:00
										 |  |  | import {render} from '@testing-library/react' | 
					
						
							|  |  |  | import "@testing-library/jest-dom" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-09 20:10:26 +02:00
										 |  |  | describe('<Tag/>', function () { | 
					
						
							|  |  |  |     it('renders without crashing ', function () { | 
					
						
							|  |  |  |         const div = document.createElement("div"); | 
					
						
							|  |  |  |         ReactDom.render(<Tag/>,div); | 
					
						
							|  |  |  |         ReactDom.unmountComponentAtNode(div); | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2020-06-09 17:49:41 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-09 20:10:26 +02:00
										 |  |  |     it('renders childs correctly', function () { | 
					
						
							|  |  |  |         const {getByTestId} = render(<Tag>test</Tag>); | 
					
						
							|  |  |  |         expect(getByTestId("Test-Tag")).toHaveTextContent("test"); | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2020-06-09 17:49:41 +02:00
										 |  |  | }); |