chore: move tests

This commit is contained in:
Marc Cataford 2020-12-12 19:15:26 -05:00
parent 6d38b057c1
commit 3dee8b73b9
2 changed files with 4 additions and 4 deletions

View file

@ -19,7 +19,7 @@
"author": "Marc Cataford <c.marcandre@gmail.com>", "author": "Marc Cataford <c.marcandre@gmail.com>",
"license": "MIT", "license": "MIT",
"files": [ "files": [
"dist/**/*.ts" "dist/*.ts"
], ],
"bin": "./dist/cli.js", "bin": "./dist/cli.js",
"repository": { "repository": {
@ -32,7 +32,7 @@
], ],
"scripts": { "scripts": {
"prebuild": "rimraf dist", "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": "eslint src/**/*.ts",
"lint:fix": "yarn lint --fix", "lint:fix": "yarn lint --fix",
"test": "jest src", "test": "jest src",

View file

@ -3,6 +3,8 @@ import { readFileSync } from 'fs'
import mockFS from 'mock-fs' import mockFS from 'mock-fs'
import runPackwatch from '..'
jest.mock('child_process') jest.mock('child_process')
function getPackOutput({ packageSize, unpackedSize }) { function getPackOutput({ packageSize, unpackedSize }) {
@ -26,8 +28,6 @@ npm notice
` `
} }
import runPackwatch from '.'
function getManifest() { function getManifest() {
try { try {
return JSON.parse(readFileSync('.packwatch.json', { encoding: 'utf8' })) return JSON.parse(readFileSync('.packwatch.json', { encoding: 'utf8' }))