Addresses issue #11 items unit testing, snapshot testing. Follows instructions from https://www.gatsbyjs.com/docs/how-to/testing/unit-testing/ ; Adding typescript config, mocks, snapshot capabilities; initial test for j40footer and snapshot, readme update, test helper for intl plugin (#79)

This commit is contained in:
Nat Hillard 2021-05-26 10:01:05 -04:00 committed by GitHub
commit ce7245b1a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 3633 additions and 27 deletions

View file

@ -0,0 +1,16 @@
import React, {ReactNode} from 'react';
import {IntlContextProvider} from 'gatsby-plugin-intl';
interface ILocalizedComponentProps {
children: ReactNode
}
export const LocalizedComponent = ({children}: ILocalizedComponentProps) => {
return (
<>
<IntlContextProvider value={{language: 'en', routed: true}}>
{children}
</IntlContextProvider>,
</>
);
};