mirror of
https://github.com/Aviortheking/next-template.git
synced 2025-07-29 08:19:50 +00:00
Added Example Component and testing framework
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
14
__tests__/components/HelloWorld.test.tsx
Normal file
14
__tests__/components/HelloWorld.test.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import React from 'react'
|
||||
import renderer from 'react-test-renderer'
|
||||
import HelloWorld from '../../components/HelloWorld'
|
||||
|
||||
/**
|
||||
* Example Test
|
||||
*
|
||||
* on first run it will generate a .snap file and after will compare result with it
|
||||
*/
|
||||
|
||||
it('render a h1', () => {
|
||||
const tree = renderer.create((<HelloWorld>Test</HelloWorld>)).toJSON()
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
Reference in New Issue
Block a user