Revert "feat: throw an Error if package.json has duplicate "repository" key (#1656)"

This reverts commit b8fb35c7e1.

fixes #1657
This commit is contained in:
Matt Travi
2020-10-12 08:21:24 -05:00
parent b8fb35c7e1
commit 3abcbaf256
5 changed files with 7 additions and 46 deletions
-18
View File
@@ -516,21 +516,3 @@ test('Throw an Error if one of the shareable config cannot be found', async (t)
code: 'MODULE_NOT_FOUND',
});
});
test('Throw an Error if package.json has duplicate "repository" key', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
const {cwd} = await gitRepo();
// Create package.json with duplicate "repository" key
await writeFile(
path.resolve(cwd, 'package.json'),
`{
"repository": "https://github.com/octocat/repository",
"repository": "https://github.com/octocat/repository"
}`
);
const error = await t.throwsAsync(t.context.getConfig({cwd}));
t.is(error.code, 'EDUPLICATEREPOSITORYKEY');
t.is(error.message, 'Duplicate `"repository"` key in package.json.');
});