From ae6e01a1b391f179a45fe2fbcb74a197a7bffbc5 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 13 Jun 2016 19:03:51 -0700 Subject: [PATCH] Add test for installing starter using 'gatsby new' --- test/integration/install-starter.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/integration/install-starter.js diff --git a/test/integration/install-starter.js b/test/integration/install-starter.js new file mode 100644 index 0000000000000..f1d3a570422a4 --- /dev/null +++ b/test/integration/install-starter.js @@ -0,0 +1,14 @@ +import test from 'ava' +import fs from 'fs-extra' +import Promise from 'bluebird' +const remove = Promise.promisify(fs.remove) +const tmpdir = require('os').tmpdir() + +import { gatsby } from '../support' + +test('calling gatsby new succesfully creates new site from default starter', async t => { + await remove(`${tmpdir}/gatsby-default-starter`) + const noArgs = await gatsby(['new', `${tmpdir}/tmp/gatsby-default-starter`]) + console.log(noArgs) + t.is(noArgs.code, 0) +})