Created
September 9, 2018 18:59
-
-
Save michelalbers/2fd1e730ff410eda2e7b15aaab1ba9dc to your computer and use it in GitHub Desktop.
Jest Setup file for testing a GraphQL Next.js App with TypeScript and Apollo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const enzyme = require('enzyme'); | |
const Adapter = require('enzyme-adapter-react-16'); | |
const config = require('./next.config'); | |
const nextConfig = require('next/config'); | |
enzyme.configure({ adapter: new Adapter() }); | |
nextConfig.setConfig({ | |
publicRuntimeConfig: { | |
IMAGE_SERVER_URL: 'http://images.foo.bar', | |
IMAGE_PROCESSOR_URL: 'https://processor.foo.bar', | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment