diff --git a/package-lock.json b/package-lock.json index 023157e1..6f7db737 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3461,11 +3461,6 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "jju": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz", - "integrity": "sha1-2t2e8BkkvHKLA/L3l5vb1i96Kqo=" - }, "js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", @@ -3505,14 +3500,6 @@ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, - "json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", - "requires": { - "jju": "1.3.0" - } - }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -5946,17 +5933,6 @@ "strip-json-comments": "2.0.1" } }, - "read-package-json": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.10.tgz", - "integrity": "sha512-iNWaEs9hW9nviu5rHADmkm/Ob5dvah5zajtTS1XbyERSzkWgSwWZ6Z12bION7bEAzVc2YRFWnAz8k/tAr+5/eg==", - "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-helpfulerror": "1.0.3", - "normalize-package-data": "2.4.0" - } - }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", diff --git a/test/fixtures.ts b/test/fixtures.ts index bd39efe2..c64f8c1e 100644 --- a/test/fixtures.ts +++ b/test/fixtures.ts @@ -64,16 +64,3 @@ export async function withFixtures( return result; } - -// Problem: the following doesn't quite work with Ava. Ava expects direct calls -// to `test`, and if it doesn't find them, it thinks that there do not exist -// any tests in a file. -// TODO: figure out a solution. Without this, the users of withFixtures have to -// remember to use test.serial rather than test. -export async function testWithFixtures( - name: string, fixtures: Fixtures, testFn: Test) { - return await withFixtures(fixtures, async () => { - // The tests are run serially because we chdir to temp directory. - return await test.serial(name, testFn); - }); -} diff --git a/test/test-clean.ts b/test/test-clean.ts index ddadb853..861cf752 100644 --- a/test/test-clean.ts +++ b/test/test-clean.ts @@ -36,7 +36,6 @@ test.failing.serial( 'should gracefully error if tsconfig is missing', async t => { await withFixtures({}, async () => { await clean(OPTIONS); - t.pass(); }); }); diff --git a/test/test-kitchen.ts b/test/test-kitchen.ts index c54c9c5b..01ef0508 100644 --- a/test/test-kitchen.ts +++ b/test/test-kitchen.ts @@ -23,22 +23,18 @@ const execOpts = { cwd: `${stagingPath}/kitchen` }; +console.log(`${chalk.blue(`${__filename} staging area: ${stagingPath}`)}`); + /** * Create a staging directory with temp fixtures used * to test on a fresh application. */ test.before(async () => { - try { - await execp('npm pack'); - const tarball = `${pkg.name}-${pkg.version}.tgz`; - await renamep(tarball, `${stagingPath}/gts.tgz`); - await ncpp('test/fixtures', `${stagingPath}/`); - await execp('npm install', execOpts); - } catch (e) { - console.error('Failed to prepare test staging sandbox.'); - console.error(e); - throw e; - } + await execp('npm pack'); + const tarball = `${pkg.name}-${pkg.version}.tgz`; + await renamep(tarball, `${stagingPath}/gts.tgz`); + await ncpp('test/fixtures', `${stagingPath}/`); + await execp('npm install', execOpts); }); test.serial('init', async t => { @@ -95,7 +91,5 @@ test.serial('clean', async t => { test.after.always('cleanup staging', async () => { if (!keep) { stagingDir.removeCallback(); - } else { - console.log(`${chalk.blue(`${__filename} staging area: ${stagingPath}`)}`); } });