diff --git a/.gitignore b/.gitignore index 25b153d..037ebdf 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,9 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules +/node_modules +test/fixtures/node_modules/cycle/node_modules/cycle +test/fixtures/node_modules/linked # coverage files .nyc_output diff --git a/config.js b/config.js index 934a076..3aed721 100644 --- a/config.js +++ b/config.js @@ -2,7 +2,6 @@ var path = require( 'path' ); - module.exports = { filePaths : { analyzers : path.join( __dirname, 'lib/analyzers' ) diff --git a/index.js b/index.js index 6f0b346..ad0b13d 100644 --- a/index.js +++ b/index.js @@ -3,12 +3,11 @@ var fs = require( 'fs' ); var path = require( 'path' ); var config = require( './config' ); -var creditUtil = require( './util/credit' ); -var packageUtil = require( './util/package' ); -var analyzersUtil = require( './util/analyzers' ); +var creditUtil = require( './lib/credit' ); +var packageUtil = require( './lib/package' ); +var analyzersUtil = require( './lib/analyzers' ); var Promise = require( 'es6-promise' ).Promise; - /** * Read project root and evaluate dependency credits * for all supported package managers diff --git a/index.spec.js b/index.spec.js deleted file mode 100644 index 073129e..0000000 --- a/index.spec.js +++ /dev/null @@ -1,36 +0,0 @@ -import test from 'ava'; -import credits from './'; -import tmp from 'tmp'; -import fs from 'fs'; - -test.cb( 'credits - folder exists', t => { - tmp.dir( { unsafeCleanup : true }, ( error, path, cleanUpCb ) => { - fs.mkdirSync( `${path}/node_modules` ); - - fs.mkdirSync( `${path}/node_modules/foo` ); - fs.writeFileSync( - `${path}/node_modules/foo/package.json`, - JSON.stringify( { author : 'Bob Calsow' } ), - 'utf8' - ); - - credits( path ) - .then( credits => { - t.deepEqual( credits.npm[ 0 ].name, 'Bob Calsow' ); - t.deepEqual( credits.npm[ 0 ].packages, [ 'foo' ] ); - - cleanUpCb(); - - t.end(); - } ); - - } ); -} ); - -test.cb( 'credits - folder does not exist', t => { - credits( '/path/that/does/not/exist' ) - .catch( error => { - t.deepEqual( error.message, '/path/that/does/not/exist does not exist' ); - t.end(); - } ); -} ); diff --git a/util/analyzers.js b/lib/analyzers.js similarity index 100% rename from util/analyzers.js rename to lib/analyzers.js diff --git a/lib/analyzers/bower/index.js b/lib/analyzers/bower/index.js index f6a8172..c36e814 100644 --- a/lib/analyzers/bower/index.js +++ b/lib/analyzers/bower/index.js @@ -2,8 +2,9 @@ var fs = require( 'fs' ); var path = require( 'path' ); -var creditUtil = require( '../../../util/credit' ); -var packageUtil = require( '../../../util/package' ); + +var creditUtil = require( '../../credit' ); +var packageUtil = require( '../../package' ); /** diff --git a/lib/analyzers/bower/index.spec.js b/lib/analyzers/bower/index.spec.js deleted file mode 100644 index 3d4d493..0000000 --- a/lib/analyzers/bower/index.spec.js +++ /dev/null @@ -1,49 +0,0 @@ -import test from 'ava'; -import tmp from 'tmp'; -import fs from 'fs'; -import getCredits from './'; - -test.cb( 'getCredits - get availalbe bower credits', t => { - tmp.dir( { unsafeCleanup : true }, ( error, path, cleanUpCb ) => { - fs.mkdirSync( `${path}/bower_components` ); - - fs.mkdirSync( `${path}/bower_components/foo` ); - fs.writeFileSync( - `${path}/bower_components/foo/bower.json`, - JSON.stringify( { - authors : [ - 'Bob Calsow' - ] - } ), - 'utf8' - ); - - - fs.mkdirSync( `${path}/bower_components/bar` ); - fs.writeFileSync( - `${path}/bower_components/bar/bower.json`, - JSON.stringify( { - authors : [ - { - name : 'Alice Bobson', - email : 'alicebobson@alison.io' - } - ] - } ), - 'utf8' - ); - - let credits = getCredits( path ); - - t.deepEqual( credits[ 0 ].name, 'Alice Bobson' ); - t.deepEqual( credits[ 0 ].email, 'alicebobson@alison.io' ); - t.deepEqual( credits[ 0 ].packages, [ 'bar' ] ); - - t.deepEqual( credits[ 1 ].name, 'Bob Calsow' ); - t.deepEqual( credits[ 1 ].packages, [ 'foo' ] ); - - cleanUpCb(); - - t.end(); - } ); -} ); diff --git a/lib/analyzers/jspm/index.js b/lib/analyzers/jspm/index.js index 8efb0e2..d9ebc52 100644 --- a/lib/analyzers/jspm/index.js +++ b/lib/analyzers/jspm/index.js @@ -2,8 +2,9 @@ var fs = require( 'fs' ); var path = require( 'path' ); -var creditUtil = require( '../../../util/credit' ); -var packageUtil = require( '../../../util/package' ); + +var creditUtil = require( '../../credit' ); +var packageUtil = require( '../../package' ); /** diff --git a/lib/analyzers/jspm/index.spec.js b/lib/analyzers/jspm/index.spec.js deleted file mode 100644 index e85e934..0000000 --- a/lib/analyzers/jspm/index.spec.js +++ /dev/null @@ -1,78 +0,0 @@ -import test from 'ava'; -import tmp from 'tmp'; -import fs from 'fs'; -import getCredits from './'; - -test.cb( 'getCredits - get availalbe jspm credits', t => { - tmp.dir( { unsafeCleanup : true }, ( error, path, cleanUpCb ) => { - fs.mkdirSync( `${path}/jspm_packages` ); - - fs.mkdirSync( `${path}/jspm_packages/github` ); - fs.mkdirSync( `${path}/jspm_packages/github/components` ); - fs.mkdirSync( `${path}/jspm_packages/github/components/foo` ); - - fs.mkdirSync( `${path}/jspm_packages/npm` ); - fs.mkdirSync( `${path}/jspm_packages/npm/boo` ); - - fs.writeFileSync( - `${path}/jspm_packages/github/components/foo/package.json`, - JSON.stringify( { author : 'Don Calsow' } ), - 'utf8' - ); - - fs.writeFileSync( - `${path}/jspm_packages/npm/boo/package.json`, - JSON.stringify( { author : 'Janice Robson' } ), - 'utf8' - ); - - fs.mkdirSync( `${path}/jspm_packages/npm/baz` ); - fs.writeFileSync( - `${path}/jspm_packages/npm/baz/package.json`, - JSON.stringify( { - author : 'Alice Bobson', - maintainers : [ - 'Randy Ran', - { - name : 'Bobby Bob', - email : 'bobby@bob.io' - } - ] - } ), - 'utf8' - ); - - fs.mkdirSync( `${path}/jspm_packages/npm/boing` ); - - fs.writeFileSync( - `${path}/jspm_packages/npm/boing/package.json`, - JSON.stringify( { author : 'Bob Calsow ' } ), - 'utf8' - ); - - let credits = getCredits( path ); - - t.deepEqual( credits[ 0 ].name, 'Alice Bobson' ); - t.deepEqual( credits[ 0 ].packages, [ 'baz' ] ); - - t.deepEqual( credits[ 1 ].name, 'Randy Ran' ); - t.deepEqual( credits[ 1 ].packages, [ 'baz' ] ); - - t.deepEqual( credits[ 2 ].name, 'Bobby Bob' ); - t.deepEqual( credits[ 2 ].email, 'bobby@bob.io' ); - t.deepEqual( credits[ 2 ].packages, [ 'baz' ] ); - - t.deepEqual( credits[ 3 ].name, 'Bob Calsow' ); - t.deepEqual( credits[ 3 ].packages, [ 'boing' ] ); - - t.deepEqual( credits[ 4 ].name, 'Janice Robson' ); - t.deepEqual( credits[ 4 ].packages, [ 'boo' ] ); - - t.deepEqual( credits[ 5 ].name, 'Don Calsow' ); - t.deepEqual( credits[ 5 ].packages, [ 'foo' ] ); - - cleanUpCb(); - - t.end(); - } ); -} ); diff --git a/lib/analyzers/npm/index.js b/lib/analyzers/npm/index.js index 44c8969..8352d04 100644 --- a/lib/analyzers/npm/index.js +++ b/lib/analyzers/npm/index.js @@ -2,8 +2,9 @@ var fs = require( 'fs' ); var path = require( 'path' ); -var creditUtil = require( '../../../util/credit' ); -var packageUtil = require( '../../../util/package' ); + +var creditUtil = require( '../../credit' ); +var packageUtil = require( '../../package' ); /** diff --git a/lib/analyzers/npm/index.spec.js b/lib/analyzers/npm/index.spec.js deleted file mode 100644 index d48cb95..0000000 --- a/lib/analyzers/npm/index.spec.js +++ /dev/null @@ -1,102 +0,0 @@ -import test from 'ava'; -import tmp from 'tmp'; -import fs from 'fs'; -import getCredits from './'; - -test.cb( 'getCredits - get availalbe npm credits', t => { - tmp.dir( { unsafeCleanup : true }, ( error, path, cleanUpCb ) => { - fs.mkdirSync( `${path}/node_modules` ); - - fs.mkdirSync( `${path}/node_modules/foo` ); - fs.writeFileSync( - `${path}/node_modules/foo/package.json`, - JSON.stringify( { author : 'Bob Calsow' } ), - 'utf8' - ); - - - fs.mkdirSync( `${path}/node_modules/bar` ); - fs.writeFileSync( - `${path}/node_modules/bar/package.json`, - JSON.stringify( { author : 'Alice Bobson' } ), - 'utf8' - ); - - - fs.mkdirSync( `${path}/node_modules/bar/node_modules` ); - fs.mkdirSync( `${path}/node_modules/bar/node_modules/boom` ); - - fs.writeFileSync( - `${path}/node_modules/bar/node_modules/boom/package.json`, - JSON.stringify( { author : { name : 'Alice Bobson' } } ), - 'utf8' - ); - - fs.mkdirSync( `${path}/node_modules/baz` ); - fs.writeFileSync( - `${path}/node_modules/baz/package.json`, - JSON.stringify( { - author : 'Alice Bobson', - maintainers : [ - 'Randy Ran', - { - name : 'Bobby Bob', - email : 'bobby@bob.io' - } - ] - } ), - 'utf8' - ); - - fs.mkdirSync( `${path}/node_modules/baz/node_modules` ); - fs.mkdirSync( `${path}/node_modules/baz/node_modules/boing` ); - - fs.writeFileSync( - `${path}/node_modules/baz/node_modules/boing/package.json`, - JSON.stringify( { author : 'Bob Calsow ' } ), - 'utf8' - ); - - - - fs.mkdirSync( `${path}/linked/` ); - fs.writeFileSync( - `${path}/linked/package.json`, - JSON.stringify( { author : 'Bob Loblaw' } ), - 'utf8' - ); - fs.symlinkSync( `${path}/linked`, `${path}/node_modules/linked` ); - - - fs.mkdirSync( `${path}/node_modules/cycle` ); - fs.writeFileSync( - `${path}/node_modules/cycle/package.json`, - JSON.stringify( { author : 'Bob Loblaw' } ), - 'utf8' - ); - - fs.mkdirSync( `${path}/node_modules/cycle/node_modules` ); - fs.symlinkSync( `${path}/node_modules/cycle`, `${path}/node_modules/cycle/node_modules/cycle` ); - - let credits = getCredits( path ); - - t.deepEqual( credits[ 0 ].name, 'Alice Bobson' ); - t.deepEqual( credits[ 0 ].packages, [ 'bar', 'boom', 'baz' ] ); - - t.deepEqual( credits[ 1 ].name, 'Randy Ran' ); - t.deepEqual( credits[ 1 ].packages, [ 'baz' ] ); - - t.deepEqual( credits[ 2 ].name, 'Bobby Bob' ); - t.deepEqual( credits[ 2 ].packages, [ 'baz' ] ); - - t.deepEqual( credits[ 3 ].name, 'Bob Calsow' ); - t.deepEqual( credits[ 3 ].packages, [ 'boing', 'foo' ] ); - - t.deepEqual( credits[ 4 ].name, 'Bob Loblaw' ); - t.deepEqual( credits[ 4 ].packages, [ 'cycle', 'linked' ] ); - - cleanUpCb(); - - t.end(); - } ); -} ); diff --git a/util/credit.js b/lib/credit.js similarity index 100% rename from util/credit.js rename to lib/credit.js diff --git a/util/package.js b/lib/package.js similarity index 100% rename from util/package.js rename to lib/package.js diff --git a/package.json b/package.json old mode 100755 new mode 100644 index 589eb32..94e0b9b --- a/package.json +++ b/package.json @@ -3,9 +3,14 @@ "version": "1.1.0", "description": "Find out on whose work your project is based on", "main": "index.js", + "files": [ + "config.js", + "index.js", + "lib" + ], "scripts": { - "lint": "eslint *.js util/* lib/*", - "test": "npm run lint && nyc ava *.spec.js ./util/*.spec.js ./lib/**/*.spec.js", + "lint": "eslint lib/*.js lib/**/*.js", + "test": "npm run lint && nyc ava", "coveralls": "nyc report --reporter=text-lcov | coveralls" }, "repository": { @@ -22,6 +27,7 @@ "ava": "^0.16.0", "coveralls": "^2.11.4", "eslint": "^3.7.1", + "fs-extra": "^0.30.0", "nyc": "^8.3.1", "tmp": "0.0.29" }, diff --git a/util/analyzers.spec.js b/test/analyzers.spec.js similarity index 93% rename from util/analyzers.spec.js rename to test/analyzers.spec.js index 6fdf935..3461c0a 100644 --- a/util/analyzers.spec.js +++ b/test/analyzers.spec.js @@ -1,7 +1,8 @@ import test from 'ava'; import tmp from 'tmp'; import fs from 'fs'; -import analyzersUtil from './analyzers'; + +import analyzersUtil from '../lib/analyzers'; test.cb( 'getAnalyzers - iterate over all availalbe analyzers', t => { tmp.dir( { unsafeCleanup : true }, ( error, path, cleanUpCb ) => { diff --git a/test/bower.spec.js b/test/bower.spec.js new file mode 100644 index 0000000..4cc6c0e --- /dev/null +++ b/test/bower.spec.js @@ -0,0 +1,19 @@ +import test from 'ava'; +import tmp from 'tmp'; +import fs from 'fs'; +import path from 'path'; + +import getCredits from '../lib/analyzers/bower'; + +const fixtures = path.resolve( './fixtures' ); + +test( 'getCredits - get availalbe bower credits', t => { + const credits = getCredits( fixtures ); + + t.deepEqual( credits[ 0 ].name, 'Alice Bobson' ); + t.deepEqual( credits[ 0 ].email, 'alicebobson@alison.io' ); + t.deepEqual( credits[ 0 ].packages, [ 'bar' ] ); + + t.deepEqual( credits[ 1 ].name, 'Bob Calsow' ); + t.deepEqual( credits[ 1 ].packages, [ 'foo' ] ); +} ); diff --git a/util/credit.spec.js b/test/credit.spec.js similarity index 97% rename from util/credit.spec.js rename to test/credit.spec.js index a46d77a..9e21eab 100644 --- a/util/credit.spec.js +++ b/test/credit.spec.js @@ -1,6 +1,6 @@ import test from 'ava'; -import creditUtil from './credit'; +import creditUtil from '../lib/credit'; test( 'getCredit - email is included', t => { let credits = [ { email : 'bob@calsow.io', url : 'http://4waisenkinder.de' } ]; diff --git a/test/fixtures/bower_components/bar/bower.json b/test/fixtures/bower_components/bar/bower.json new file mode 100644 index 0000000..c621bfb --- /dev/null +++ b/test/fixtures/bower_components/bar/bower.json @@ -0,0 +1 @@ +{"authors":[{"name":"Alice Bobson","email":"alicebobson@alison.io"}]} \ No newline at end of file diff --git a/test/fixtures/bower_components/foo/bower.json b/test/fixtures/bower_components/foo/bower.json new file mode 100644 index 0000000..5686125 --- /dev/null +++ b/test/fixtures/bower_components/foo/bower.json @@ -0,0 +1 @@ +{"authors":["Bob Calsow"]} \ No newline at end of file diff --git a/test/fixtures/jspm_packages/github/components/foo/package.json b/test/fixtures/jspm_packages/github/components/foo/package.json new file mode 100644 index 0000000..cbde5e2 --- /dev/null +++ b/test/fixtures/jspm_packages/github/components/foo/package.json @@ -0,0 +1 @@ +{"author":"Don Calsow"} \ No newline at end of file diff --git a/test/fixtures/jspm_packages/npm/baz/package.json b/test/fixtures/jspm_packages/npm/baz/package.json new file mode 100644 index 0000000..2698438 --- /dev/null +++ b/test/fixtures/jspm_packages/npm/baz/package.json @@ -0,0 +1 @@ +{"author":"Alice Bobson","maintainers":["Randy Ran",{"name":"Bobby Bob","email":"bobby@bob.io"}]} \ No newline at end of file diff --git a/test/fixtures/jspm_packages/npm/boing/package.json b/test/fixtures/jspm_packages/npm/boing/package.json new file mode 100644 index 0000000..4ecdf11 --- /dev/null +++ b/test/fixtures/jspm_packages/npm/boing/package.json @@ -0,0 +1 @@ +{"author":"Bob Calsow "} \ No newline at end of file diff --git a/test/fixtures/jspm_packages/npm/boo/package.json b/test/fixtures/jspm_packages/npm/boo/package.json new file mode 100644 index 0000000..9a0d463 --- /dev/null +++ b/test/fixtures/jspm_packages/npm/boo/package.json @@ -0,0 +1 @@ +{"author":"Janice Robson"} \ No newline at end of file diff --git a/test/fixtures/linked/package.json b/test/fixtures/linked/package.json new file mode 100644 index 0000000..49c170b --- /dev/null +++ b/test/fixtures/linked/package.json @@ -0,0 +1 @@ +{"author":"Bob Loblaw"} \ No newline at end of file diff --git a/test/fixtures/node_modules/bar/node_modules/boom/package.json b/test/fixtures/node_modules/bar/node_modules/boom/package.json new file mode 100644 index 0000000..00c16bb --- /dev/null +++ b/test/fixtures/node_modules/bar/node_modules/boom/package.json @@ -0,0 +1 @@ +{"author":{"name":"Alice Bobson"}} \ No newline at end of file diff --git a/test/fixtures/node_modules/bar/package.json b/test/fixtures/node_modules/bar/package.json new file mode 100644 index 0000000..e8ed32b --- /dev/null +++ b/test/fixtures/node_modules/bar/package.json @@ -0,0 +1 @@ +{"author":"Alice Bobson"} \ No newline at end of file diff --git a/test/fixtures/node_modules/baz/node_modules/boing/package.json b/test/fixtures/node_modules/baz/node_modules/boing/package.json new file mode 100644 index 0000000..4ecdf11 --- /dev/null +++ b/test/fixtures/node_modules/baz/node_modules/boing/package.json @@ -0,0 +1 @@ +{"author":"Bob Calsow "} \ No newline at end of file diff --git a/test/fixtures/node_modules/baz/package.json b/test/fixtures/node_modules/baz/package.json new file mode 100644 index 0000000..2698438 --- /dev/null +++ b/test/fixtures/node_modules/baz/package.json @@ -0,0 +1 @@ +{"author":"Alice Bobson","maintainers":["Randy Ran",{"name":"Bobby Bob","email":"bobby@bob.io"}]} \ No newline at end of file diff --git a/test/fixtures/node_modules/cycle/package.json b/test/fixtures/node_modules/cycle/package.json new file mode 100644 index 0000000..49c170b --- /dev/null +++ b/test/fixtures/node_modules/cycle/package.json @@ -0,0 +1 @@ +{"author":"Bob Loblaw"} \ No newline at end of file diff --git a/test/fixtures/node_modules/foo/package.json b/test/fixtures/node_modules/foo/package.json new file mode 100644 index 0000000..6ce6cf9 --- /dev/null +++ b/test/fixtures/node_modules/foo/package.json @@ -0,0 +1 @@ +{"author":"Bob Calsow"} \ No newline at end of file diff --git a/test/index.spec.js b/test/index.spec.js new file mode 100644 index 0000000..aa91d6a --- /dev/null +++ b/test/index.spec.js @@ -0,0 +1,24 @@ +import test from 'ava'; +import tmp from 'tmp'; +import fs from 'fs'; +import path from 'path'; + +import credits from '../'; + +const fixtures = path.resolve( './fixtures' ); + +test( 'credits - folder exists', t => { + return credits( fixtures ) + .then( credits => { + t.deepEqual( credits.npm[ 0 ].name, 'Alice Bobson' ); + t.deepEqual( credits.npm[ 0 ].packages, ['bar', 'boom', 'baz'] ); + } ); +} ); + +test( 'credits - folder does not exist', t => { + return credits( '/path/that/does/not/exist' ) + .catch( error => { + t.deepEqual( error.message, '/path/that/does/not/exist does not exist' ); + t.pass(); + } ); +} ); diff --git a/test/jspm.spec.js b/test/jspm.spec.js new file mode 100644 index 0000000..42bfb17 --- /dev/null +++ b/test/jspm.spec.js @@ -0,0 +1,32 @@ +import test from 'ava'; +import tmp from 'tmp'; +import fs from 'fs'; +import path from 'path'; + +import getCredits from '../lib/analyzers/jspm'; + +const fixtures = path.resolve( './fixtures' ); + +test( 'getCredits - get availalbe jspm credits', t => { + const credits = getCredits( fixtures ); + + t.deepEqual( credits[ 0 ].name, 'Alice Bobson' ); + t.deepEqual( credits[ 0 ].packages, [ 'baz' ] ); + + t.deepEqual( credits[ 1 ].name, 'Randy Ran' ); + t.deepEqual( credits[ 1 ].packages, [ 'baz' ] ); + + t.deepEqual( credits[ 2 ].name, 'Bobby Bob' ); + t.deepEqual( credits[ 2 ].email, 'bobby@bob.io' ); + t.deepEqual( credits[ 2 ].packages, [ 'baz' ] ); + + t.deepEqual( credits[ 3 ].name, 'Bob Calsow' ); + t.deepEqual( credits[ 3 ].packages, [ 'boing' ] ); + + t.deepEqual( credits[ 4 ].name, 'Janice Robson' ); + t.deepEqual( credits[ 4 ].packages, [ 'boo' ] ); + + t.deepEqual( credits[ 5 ].name, 'Don Calsow' ); + t.deepEqual( credits[ 5 ].packages, [ 'foo' ] ); + +} ); diff --git a/test/npm.spec.js b/test/npm.spec.js new file mode 100644 index 0000000..13c18a3 --- /dev/null +++ b/test/npm.spec.js @@ -0,0 +1,30 @@ +import test from 'ava'; +import tmp from 'tmp'; +import fs from 'fs-extra'; +import path from 'path'; + +import getCredits from '../lib/analyzers/npm'; + +const fixtures = path.resolve( './fixtures' ); + +test( 'getCredits - get availalbe npm credits', t => { + fs.ensureSymlinkSync( `${fixtures}/linked`, `${fixtures}/node_modules/linked` ); + fs.ensureSymlinkSync( `${fixtures}/node_modules/cycle`, `${fixtures}/node_modules/cycle/node_modules/cycle` ); + + const credits = getCredits( fixtures ); + + t.deepEqual( credits[ 0 ].name, 'Alice Bobson' ); + t.deepEqual( credits[ 0 ].packages, [ 'bar', 'boom', 'baz' ] ); + + t.deepEqual( credits[ 1 ].name, 'Randy Ran' ); + t.deepEqual( credits[ 1 ].packages, [ 'baz' ] ); + + t.deepEqual( credits[ 2 ].name, 'Bobby Bob' ); + t.deepEqual( credits[ 2 ].packages, [ 'baz' ] ); + + t.deepEqual( credits[ 3 ].name, 'Bob Calsow' ); + t.deepEqual( credits[ 3 ].packages, [ 'boing', 'foo' ] ); + + t.deepEqual( credits[ 4 ].name, 'Bob Loblaw' ); + t.deepEqual( credits[ 4 ].packages, [ 'cycle', 'linked' ] ); +} ); diff --git a/util/package.spec.js b/test/package.spec.js similarity index 98% rename from util/package.spec.js rename to test/package.spec.js index e574d27..6ae225c 100644 --- a/util/package.spec.js +++ b/test/package.spec.js @@ -1,6 +1,7 @@ import test from 'ava'; import { authors, index } from 'all-stars'; -import packageUtil from './package'; + +import packageUtil from '../lib/package'; test( 'getAuthor - author is a string', t => { // only short hand name