import React from 'react' ; import { render } from '@testing-library/react' ; import Diploma from '../Diploma' ; import sweData from '../../data/json/swe.json' ; import staticData from '../../data/json/static.json' ; jest . mock ( 'crypto' , ( ) => ( { randomBytes : ( num ) => new Array ( num ) . fill ( 0 ) , } ) ) ; describe ( '<Diploma />' , ( ) => { test ( 'should render correctly' , ( ) => { const { asFragment } = render ( < Diploma diplomaData = { sweData } / > ) ; expect ( asFragment ( ) ) . toMatchSnapshot ( ) ; } ) ; } ) ;