This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

View File

@@ -0,0 +1,46 @@
const envKeyToSetting = require('./envKeyToSetting');
const fixtures = [
[
'FOO',
'foo',
],
[
'//npm.pkg.github.com/:_authToken',
'//npm.pkg.github.com/:_authToken',
],
[
'_authToken',
'_authToken',
],
[
'//npm.pkg.github.com/:_authtoken',
'//npm.pkg.github.com/:_authToken',
],
[
'_authtoken',
'_authToken',
],
[
'//npm.pkg.github.com/:_auth',
'//npm.pkg.github.com/:_auth',
],
[
'_auth',
'_auth',
],
[
'//npm.pkg.github.com/:_always_auth',
'//npm.pkg.github.com/:_always-auth',
],
[
'_always_auth',
'_always-auth',
],
];
test('envKeyToSetting()', () => {
for (const [key, expected] of fixtures) {
expect(envKeyToSetting(key)).toBe(expected);
}
})