From 3dee8b73b9cc53856d9be528bbd695eb51d6d2f6 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 12 Dec 2020 19:15:26 -0500 Subject: [PATCH] chore: move tests --- package.json | 4 ++-- src/{ => __tests__}/index.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/{ => __tests__}/index.test.ts (99%) diff --git a/package.json b/package.json index c774b29..dba1beb 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "author": "Marc Cataford ", "license": "MIT", "files": [ - "dist/**/*.ts" + "dist/*.ts" ], "bin": "./dist/cli.js", "repository": { @@ -32,7 +32,7 @@ ], "scripts": { "prebuild": "rimraf dist", - "build": "babel src -d dist --extensions .ts", + "build": "babel src/index.ts src/cli.ts -d dist --extensions .ts", "lint": "eslint src/**/*.ts", "lint:fix": "yarn lint --fix", "test": "jest src", diff --git a/src/index.test.ts b/src/__tests__/index.test.ts similarity index 99% rename from src/index.test.ts rename to src/__tests__/index.test.ts index 5851ced..b40c800 100644 --- a/src/index.test.ts +++ b/src/__tests__/index.test.ts @@ -3,6 +3,8 @@ import { readFileSync } from 'fs' import mockFS from 'mock-fs' +import runPackwatch from '..' + jest.mock('child_process') function getPackOutput({ packageSize, unpackedSize }) { @@ -26,8 +28,6 @@ npm notice ` } -import runPackwatch from '.' - function getManifest() { try { return JSON.parse(readFileSync('.packwatch.json', { encoding: 'utf8' }))