Skip to content

Instantly share code, notes, and snippets.

View magnusriga's full-sized avatar

Magnus magnusriga

View GitHub Profile
@magnusriga
magnusriga / gatsby-node.js
Last active May 3, 2019 23:40
Jest Testing gatsby-node.js
import fs from 'fs';
import path from 'path';
import os from 'os';
// Write out the GlobalStyleComponent module to .cache.
// Happens before webpack starts compiling page.
// .cache is available when gatsby-browser.js and gatsby-ssr.js runs.
// eslint-disable-next-line import/prefer-default-export
export const onPreBootstrap = ({ store }, pluginOptions) => {