UNPKG

node-publisher

Version:

A configurable release automation tool inspired by create-react-app and Travis CI.

23 lines (19 loc) 415 B
const { packageJson } = require('./index'); jest.mock('fs'); describe('packageJson', () => { it('returns the package.json as a JSON object', () => { require('fs').__setReadFileSyncReturnValue( 'package.json', JSON.stringify({ scripts: { test: 'jest' } }) ); expect(packageJson()).toEqual({ scripts: { test: 'jest' } }); }); });