Commit 5104d6d5 authored by Nick Kipling's avatar Nick Kipling

Applying reviewer feedback

Applied patch to prefer object over array order
parent abdc8e5e
...@@ -5,7 +5,7 @@ import { dependencyLinks } from '../../mock_data'; ...@@ -5,7 +5,7 @@ import { dependencyLinks } from '../../mock_data';
describe('DependencyRow', () => { describe('DependencyRow', () => {
let wrapper; let wrapper;
const [withoutFramework, withoutVersion, fullLink] = dependencyLinks; const { withoutFramework, withoutVersion, fullLink } = dependencyLinks;
function createComponent({ dependencyLink = fullLink } = {}) { function createComponent({ dependencyLink = fullLink } = {}) {
wrapper = shallowMount(DependencyRow, { wrapper = shallowMount(DependencyRow, {
......
...@@ -92,12 +92,20 @@ export const conanPackage = { ...@@ -92,12 +92,20 @@ export const conanPackage = {
_links, _links,
}; };
export const dependencyLinks = [ export const dependencyLinks = {
{ name: 'Moqi', version_pattern: '2.5.6' }, withoutFramework: { name: 'Moqi', version_pattern: '2.5.6' },
{ name: 'Castle.Core', version_pattern: '' }, withoutVersion: { name: 'Castle.Core', version_pattern: '' },
{ name: 'Test.Dependency', version_pattern: '2.3.7', target_framework: '.NETStandard2.0' }, fullLink: {
{ name: 'Newtonsoft.Json', version_pattern: '12.0.3', target_framework: '.NETStandard2.0' }, name: 'Test.Dependency',
]; version_pattern: '2.3.7',
target_framework: '.NETStandard2.0',
},
anotherFullLink: {
name: 'Newtonsoft.Json',
version_pattern: '12.0.3',
target_framework: '.NETStandard2.0',
},
};
export const nugetPackage = { export const nugetPackage = {
created_at: '2015-12-10', created_at: '2015-12-10',
...@@ -109,7 +117,7 @@ export const nugetPackage = { ...@@ -109,7 +117,7 @@ export const nugetPackage = {
tags: [], tags: [],
updated_at: '2015-12-10', updated_at: '2015-12-10',
version: '1.0.0', version: '1.0.0',
dependency_links: dependencyLinks, dependency_links: Object.values(dependencyLinks),
}; };
export const pypiPackage = { export const pypiPackage = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment