Skip to content

Commit

Permalink
fix: env option merge and update test (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
judyhe authored and mdreizin committed Jul 23, 2018
1 parent 029e99d commit 7eb4712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const getOptions = pluginOptions => {
delete options.env;
delete options.resolveEnv;

return { ...options, envOptions };
return { ...options, ...envOptions };
};

export async function onPostBuild({ graphql }, pluginOptions) {
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/gatsby-node.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

exports[`onPostBuild should generate \`robots.txt\` using \`env\` options 1`] = `
"User-agent: *
Allow: /
Disallow: /
Sitemap: https://www.test.com/sitemap.xml
Host: https://www.test.com
"
`;

exports[`onPostBuild should generate \`robots.txt\` using \`env\` options and \`resolveEnv\` function 1`] = `
"User-agent: *
Allow: /
Disallow: /
Sitemap: https://www.test.com/sitemap.xml
Host: https://www.test.com
"
Expand Down

0 comments on commit 7eb4712

Please sign in to comment.