mirror of
				https://gitea.com/actions/setup-node.git
				synced 2025-10-29 07:47:20 +00:00 
			
		
		
		
	format
This commit is contained in:
		| @@ -81,8 +81,8 @@ describe('authutil tests', () => { | |||||||
|     expect(fs.statSync(rcFile)).toBeDefined(); |     expect(fs.statSync(rcFile)).toBeDefined(); | ||||||
|     let contents = fs.readFileSync(rcFile, {encoding: 'utf8'}); |     let contents = fs.readFileSync(rcFile, {encoding: 'utf8'}); | ||||||
|     let rc = readRcFile(rcFile); |     let rc = readRcFile(rcFile); | ||||||
|     expect(rc["registry"]).toBe("https://registry.npmjs.org/"); |     expect(rc['registry']).toBe('https://registry.npmjs.org/'); | ||||||
|     expect(rc["always-auth"]).toBe("false"); |     expect(rc['always-auth']).toBe('false'); | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   it('Appends trailing slash to registry', async () => { |   it('Appends trailing slash to registry', async () => { | ||||||
| @@ -90,8 +90,8 @@ describe('authutil tests', () => { | |||||||
|  |  | ||||||
|     expect(fs.statSync(rcFile)).toBeDefined(); |     expect(fs.statSync(rcFile)).toBeDefined(); | ||||||
|     let rc = readRcFile(rcFile); |     let rc = readRcFile(rcFile); | ||||||
|     expect(rc["registry"]).toBe("https://registry.npmjs.org/"); |     expect(rc['registry']).toBe('https://registry.npmjs.org/'); | ||||||
|     expect(rc["always-auth"]).toBe("false"); |     expect(rc['always-auth']).toBe('false'); | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   it('Configures scoped npm registries', async () => { |   it('Configures scoped npm registries', async () => { | ||||||
| @@ -100,8 +100,8 @@ describe('authutil tests', () => { | |||||||
|  |  | ||||||
|     expect(fs.statSync(rcFile)).toBeDefined(); |     expect(fs.statSync(rcFile)).toBeDefined(); | ||||||
|     let rc = readRcFile(rcFile); |     let rc = readRcFile(rcFile); | ||||||
|     expect(rc["@myscope:registry"]).toBe("https://registry.npmjs.org/"); |     expect(rc['@myscope:registry']).toBe('https://registry.npmjs.org/'); | ||||||
|     expect(rc["always-auth"]).toBe("false"); |     expect(rc['always-auth']).toBe('false'); | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   it('Automatically configures GPR scope', async () => { |   it('Automatically configures GPR scope', async () => { | ||||||
| @@ -109,15 +109,15 @@ describe('authutil tests', () => { | |||||||
|  |  | ||||||
|     expect(fs.statSync(rcFile)).toBeDefined(); |     expect(fs.statSync(rcFile)).toBeDefined(); | ||||||
|     let rc = readRcFile(rcFile); |     let rc = readRcFile(rcFile); | ||||||
|     expect(rc["@ownername:registry"]).toBe("npm.pkg.github.com/"); |     expect(rc['@ownername:registry']).toBe('npm.pkg.github.com/'); | ||||||
|     expect(rc["always-auth"]).toBe("false"); |     expect(rc['always-auth']).toBe('false'); | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   it('Sets up npmrc for always-auth true', async () => { |   it('Sets up npmrc for always-auth true', async () => { | ||||||
|     await auth.configAuthentication('https://registry.npmjs.org/', 'true'); |     await auth.configAuthentication('https://registry.npmjs.org/', 'true'); | ||||||
|     expect(fs.statSync(rcFile)).toBeDefined(); |     expect(fs.statSync(rcFile)).toBeDefined(); | ||||||
|     let rc = readRcFile(rcFile); |     let rc = readRcFile(rcFile); | ||||||
|     expect(rc["registry"]).toBe("https://registry.npmjs.org/"); |     expect(rc['registry']).toBe('https://registry.npmjs.org/'); | ||||||
|     expect(rc["always-auth"]).toBe("true"); |     expect(rc['always-auth']).toBe('true'); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Bryan MacFarlane
					Bryan MacFarlane