diff --git a/index.js b/index.js index e6f0f78b..3c0493db 100755 --- a/index.js +++ b/index.js @@ -14,7 +14,14 @@ const sortObjectBy = comparator => onObject(x => sortObjectKeys(x, comparator)) const sortObject = sortObjectBy() const sortURLObject = sortObjectBy(['type', 'url']) const sortPeopleObject = sortObjectBy(['name', 'email', 'url']) -const sortDirectories = sortObjectBy(['lib', 'bin', 'man', 'doc', 'example']) +const sortDirectories = sortObjectBy([ + 'lib', + 'bin', + 'man', + 'doc', + 'example', + 'test', +]) // See https://docs.npmjs.com/misc/scripts const defaultNpmScripts = new Set([ diff --git a/test.js b/test.js index 5471d581..0a698a55 100644 --- a/test.js +++ b/test.js @@ -373,11 +373,12 @@ testField('directories', [ [UNKNOWN]: UNKNOWN, example: 'example', man: 'man', + test: 'test', doc: 'doc', bin: 'bin', lib: 'lib', }, - expect: ['lib', 'bin', 'man', 'doc', 'example', UNKNOWN], + expect: ['lib', 'bin', 'man', 'doc', 'example', 'test', UNKNOWN], }, ])