@@ -38,7 +38,7 @@ Generated by [AVA](https://avajs.dev).
3838 "exports": {␊
3939 "unknown": "./unknown.unknown",␊
4040 "./path-not-really-makes-no-sense": {},␊
41- "default": "./types.d.ts ",␊
41+ "default": "./default.js ",␊
4242 "import": "./import.mjs"␊
4343 }␊
4444 }`,
@@ -48,7 +48,7 @@ Generated by [AVA](https://avajs.dev).
4848 "./path-not-really-makes-no-sense": {},␊
4949 "unknown": "./unknown.unknown",␊
5050 "import": "./import.mjs",␊
51- "default": "./types.d.ts "␊
51+ "default": "./default.js "␊
5252 }␊
5353 }`,
5454 pretty: true,
@@ -118,7 +118,7 @@ Generated by [AVA](https://avajs.dev).
118118 "./deep": {␊
119119 "unknown": "./unknown.unknown",␊
120120 "./path-not-really-makes-no-sense": {},␊
121- "default": "./types.d.ts ",␊
121+ "default": "./default.js ",␊
122122 "import": "./import.mjs"␊
123123 }␊
124124 }␊
@@ -130,7 +130,7 @@ Generated by [AVA](https://avajs.dev).
130130 "./path-not-really-makes-no-sense": {},␊
131131 "unknown": "./unknown.unknown",␊
132132 "import": "./import.mjs",␊
133- "default": "./types.d.ts "␊
133+ "default": "./default.js "␊
134134 }␊
135135 }␊
136136 }`,
@@ -166,6 +166,44 @@ Generated by [AVA](https://avajs.dev).
166166 pretty: true,
167167 }
168168
169+ ## Only 'types'
170+
171+ > Should sort ` exports ` as object.
172+
173+ {
174+ input: `{␊
175+ "exports": {␊
176+ "types": "./types.d.ts"␊
177+ }␊
178+ }`,
179+ options: undefined,
180+ output: `{␊
181+ "exports": {␊
182+ "types": "./types.d.ts"␊
183+ }␊
184+ }`,
185+ pretty: true,
186+ }
187+
188+ ## Only 'default'
189+
190+ > Should sort ` exports ` as object.
191+
192+ {
193+ input: `{␊
194+ "exports": {␊
195+ "default": "./default.js"␊
196+ }␊
197+ }`,
198+ options: undefined,
199+ output: `{␊
200+ "exports": {␊
201+ "default": "./default.js"␊
202+ }␊
203+ }`,
204+ pretty: true,
205+ }
206+
169207## Only 'module-sync' and 'require'
170208
171209> Should sort ` exports ` as object.
@@ -186,3 +224,28 @@ Generated by [AVA](https://avajs.dev).
186224 }`,
187225 pretty: true,
188226 }
227+
228+ ## Well formed
229+
230+ > Should sort ` exports ` as object.
231+
232+ {
233+ input: `{␊
234+ "exports": {␊
235+ "import": "./import.mjs",␊
236+ "module-sync": "./module-sync.mjs",␊
237+ "require": "./require.cjs",␊
238+ "default": "./default.js"␊
239+ }␊
240+ }`,
241+ options: undefined,
242+ output: `{␊
243+ "exports": {␊
244+ "import": "./import.mjs",␊
245+ "module-sync": "./module-sync.mjs",␊
246+ "require": "./require.cjs",␊
247+ "default": "./default.js"␊
248+ }␊
249+ }`,
250+ pretty: true,
251+ }
0 commit comments