@@ -519,3 +519,119 @@ test('test process release - process.release ~
[email protected] - bogus string pa
519519 } )
520520} )
521521
522+ test ( 'test process release - NODEJS_ORG_MIRROR' , function ( t ) {
523+ t . plan ( 2 )
524+
525+ process . env . NODEJS_ORG_MIRROR = 'http://foo.bar'
526+
527+ var release = processRelease ( [ ] , { opts : { } } , 'v4.1.23' , {
528+ name : 'node' ,
529+ headersUrl : 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
530+ } )
531+
532+ t . equal ( release . semver . version , '4.1.23' )
533+ delete release . semver
534+
535+ t . deepEqual ( release , {
536+ version : '4.1.23' ,
537+ name : 'node' ,
538+ baseUrl : 'http://foo.bar/v4.1.23/' ,
539+ tarballUrl : 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz' ,
540+ shasumsUrl : 'http://foo.bar/v4.1.23/SHASUMS256.txt' ,
541+ versionDir : '4.1.23' ,
542+ libUrl32 : 'http://foo.bar/v4.1.23/win-x86/node.lib' ,
543+ libUrl64 : 'http://foo.bar/v4.1.23/win-x64/node.lib' ,
544+ libPath32 : 'win-x86/node.lib' ,
545+ libPath64 : 'win-x64/node.lib'
546+ } )
547+
548+ delete process . env . NODEJS_ORG_MIRROR
549+ } )
550+
551+ test ( 'test process release - NVM_NODEJS_ORG_MIRROR' , function ( t ) {
552+ t . plan ( 2 )
553+
554+ process . env . NVM_NODEJS_ORG_MIRROR = 'http://foo.bar'
555+
556+ var release = processRelease ( [ ] , { opts : { } } , 'v4.1.23' , {
557+ name : 'node' ,
558+ headersUrl : 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
559+ } )
560+
561+ t . equal ( release . semver . version , '4.1.23' )
562+ delete release . semver
563+
564+ t . deepEqual ( release , {
565+ version : '4.1.23' ,
566+ name : 'node' ,
567+ baseUrl : 'http://foo.bar/v4.1.23/' ,
568+ tarballUrl : 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz' ,
569+ shasumsUrl : 'http://foo.bar/v4.1.23/SHASUMS256.txt' ,
570+ versionDir : '4.1.23' ,
571+ libUrl32 : 'http://foo.bar/v4.1.23/win-x86/node.lib' ,
572+ libUrl64 : 'http://foo.bar/v4.1.23/win-x64/node.lib' ,
573+ libPath32 : 'win-x86/node.lib' ,
574+ libPath64 : 'win-x64/node.lib'
575+ } )
576+
577+ delete process . env . NVM_NODEJS_ORG_MIRROR
578+ } )
579+
580+ test ( 'test process release - IOJS_ORG_MIRROR' , function ( t ) {
581+ t . plan ( 2 )
582+
583+ process . env . IOJS_ORG_MIRROR = 'http://foo.bar'
584+
585+ var release = processRelease ( [ ] , { opts : { } } , 'v3.2.24' , {
586+ name : 'io.js' ,
587+ headersUrl : 'https://iojs.org/download/release/v3.2.24/iojs-v3.2.24-headers.tar.gz'
588+ } )
589+
590+ t . equal ( release . semver . version , '3.2.24' )
591+ delete release . semver
592+
593+ t . deepEqual ( release , {
594+ version : '3.2.24' ,
595+ name : 'iojs' ,
596+ baseUrl : 'http://foo.bar/v3.2.24/' ,
597+ tarballUrl : 'http://foo.bar/v3.2.24/iojs-v3.2.24-headers.tar.gz' ,
598+ shasumsUrl : 'http://foo.bar/v3.2.24/SHASUMS256.txt' ,
599+ versionDir : 'iojs-3.2.24' ,
600+ libUrl32 : 'http://foo.bar/v3.2.24/win-x86/iojs.lib' ,
601+ libUrl64 : 'http://foo.bar/v3.2.24/win-x64/iojs.lib' ,
602+ libPath32 : 'win-x86/iojs.lib' ,
603+ libPath64 : 'win-x64/iojs.lib'
604+ } )
605+
606+ delete process . env . IOJS_ORG_MIRROR
607+ } )
608+
609+
610+ test ( 'test process release - NVM_IOJS_ORG_MIRROR' , function ( t ) {
611+ t . plan ( 2 )
612+
613+ process . env . NVM_IOJS_ORG_MIRROR = 'http://foo.bar'
614+
615+ var release = processRelease ( [ ] , { opts : { } } , 'v3.2.24' , {
616+ name : 'io.js' ,
617+ headersUrl : 'https://iojs.org/download/release/v3.2.24/iojs-v3.2.24-headers.tar.gz'
618+ } )
619+
620+ t . equal ( release . semver . version , '3.2.24' )
621+ delete release . semver
622+
623+ t . deepEqual ( release , {
624+ version : '3.2.24' ,
625+ name : 'iojs' ,
626+ baseUrl : 'http://foo.bar/v3.2.24/' ,
627+ tarballUrl : 'http://foo.bar/v3.2.24/iojs-v3.2.24-headers.tar.gz' ,
628+ shasumsUrl : 'http://foo.bar/v3.2.24/SHASUMS256.txt' ,
629+ versionDir : 'iojs-3.2.24' ,
630+ libUrl32 : 'http://foo.bar/v3.2.24/win-x86/iojs.lib' ,
631+ libUrl64 : 'http://foo.bar/v3.2.24/win-x64/iojs.lib' ,
632+ libPath32 : 'win-x86/iojs.lib' ,
633+ libPath64 : 'win-x64/iojs.lib'
634+ } )
635+
636+ delete process . env . NVM_IOJS_ORG_MIRROR
637+ } )
0 commit comments