prettier-package-json
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -11,3 +11,3 @@ { | ||
"bugs": "https://github.com/cameronhunter/prettier-package-json/issues", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"main": "src/index.js", | ||
@@ -38,3 +38,8 @@ "bin": { | ||
"keywords": [ | ||
"cleanup", | ||
"formatter", | ||
"json", | ||
"keys", | ||
"object", | ||
"package", | ||
"package.json", | ||
@@ -41,0 +46,0 @@ "prettier", |
@@ -23,2 +23,14 @@ const { format } = require('../src'); | ||
test('It orders unspecified keys alphabetically at the end', () => { | ||
const json = { | ||
unknownPropertyB: false, | ||
unknownPropertyA: true, | ||
description: 'Description', | ||
version: '0.0.0', | ||
name: 'Test' | ||
}; | ||
expect(format(json, { keyOrder: ['name', 'version', 'description'] })).toMatchSnapshot(); | ||
}); | ||
test('It orders keys using a custom key order function', () => { | ||
@@ -25,0 +37,0 @@ const json = { |
Sorry, the diff of this file is not supported yet
509
104355
27