@@ -32,7 +32,9 @@ describe("Package JSON", () => {
3232 core : "0.0.24" ,
3333 "led-strip" : "1.2.3" ,
3434 } ,
35- registry : [ "https://registry.example.com" , "https://backup.registry.com" ] ,
35+ jaculus : {
36+ registry : [ "https://registry.example.com" , "https://backup.registry.com" ] ,
37+ } ,
3638 } ;
3739
3840 const packagePath = path . join ( tempDir , "package.json" ) ;
@@ -46,7 +48,9 @@ describe("Package JSON", () => {
4648 expect ( loaded . description ) . to . equal ( "A test package" ) ;
4749 expect ( loaded . dependencies ) . to . have . property ( "core" , "0.0.24" ) ;
4850 expect ( loaded . dependencies ) . to . have . property ( "led-strip" , "1.2.3" ) ;
49- expect ( loaded . registry ) . to . be . an ( "array" ) . that . includes ( "https://registry.example.com" ) ;
51+ expect ( loaded . jaculus ?. registry )
52+ . to . be . an ( "array" )
53+ . that . includes ( "https://registry.example.com" ) ;
5054 } ) ;
5155
5256 it ( "should load minimal valid package.json with only dependencies" , async ( ) => {
@@ -68,7 +72,7 @@ describe("Package JSON", () => {
6872 expect ( loaded . name ) . to . equal ( "minimal-package" ) ;
6973 expect ( loaded . version ) . to . equal ( "1.0.0" ) ;
7074 expect ( loaded . description ) . to . be . undefined ;
71- expect ( loaded . registry ) . to . be . undefined ;
75+ expect ( loaded . jaculus ) . to . be . undefined ;
7276 } ) ;
7377
7478 it ( "should load package.json with empty dependencies" , async ( ) => {
@@ -263,7 +267,9 @@ describe("Package JSON", () => {
263267 core : "0.0.24" ,
264268 "led-strip" : "1.2.3" ,
265269 } ,
266- registry : [ "https://registry.example.com" ] ,
270+ jaculus : {
271+ registry : [ "https://registry.example.com" ] ,
272+ } ,
267273 } ;
268274
269275 await savePackageJson ( mockFs , path . join ( tempDir , "package.json" ) , packageData ) ;
@@ -384,7 +390,9 @@ describe("Package JSON", () => {
384390 core : "0.0.24" ,
385391 "test-lib" : "2.1.0-beta" ,
386392 } ,
387- registry : [ "https://test.registry.com" , "https://backup.registry.com" ] ,
393+ jaculus : {
394+ registry : [ "https://test.registry.com" , "https://backup.registry.com" ] ,
395+ } ,
388396 } ;
389397
390398 await savePackageJson ( mockFs , path . join ( tempDir , "roundtrip.json" ) , originalData ) ;
0 commit comments