1.0.0 • Published 6 years ago

happo-plugin-gatsby v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

happo-plugin-gatsby

A happo.io plugin making it easy to add screenshot testing for Gatsby projects.

Usage

Add the following to your .happo.js configuration file:

// .happo.js
const happoPluginGatsby = require('happo-plugin-gatsby');

module.exports = {
  // ...
  plugins: [
    happoPluginGatsby({
      pages: ['/', '/blog', '/blog/how-we-do-things'],
      // other options go here
    }),
  ],

  type: 'plain',
}

Options

pages

By default, only the index page is included in the test suite. List all URLs that you want to be part of the test suite in the pages array.

happoPluginGatsby({
  pages: ['/', '/blog', '/about'],
});

outputDir

Use this option to override where Happo stores the Gatby build. The default is 'public'.

happoPluginGatsby({
  publicFolder: 'happo-public'
});