1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-18 09:06:14 +07:00

fix: refactoring version page / fix issue not found page #100 (#117)

* chore: refactoring version page

* refactor: migrate version page to hooks

* refactor: Version page better imports

* fix: #100 render not found on click item

* test: add test for version page

* chore: update mocks

* test: add scenario for not found package

* chore: fix wrong mock path

* chore: update mock

* chore: add todo list
This commit is contained in:
Juan Picado @jotadeveloper
2019-08-25 14:34:27 +02:00
committed by GitHub
parent e7d3c461cd
commit 97e8448098
42 changed files with 25186 additions and 678 deletions

View File

@@ -18,7 +18,7 @@ describe('<Dist /> component', () => {
license: '',
},
};
jest.doMock('../../pages/version/Version', () => ({
jest.doMock('../../pages/Version', () => ({
DetailContextConsumer: component => {
return component.children({ packageMeta });
},
@@ -41,7 +41,7 @@ describe('<Dist /> component', () => {
license: 'MIT',
},
};
jest.doMock('../../pages/version/Version', () => ({
jest.doMock('../../pages/Version', () => ({
DetailContextConsumer: component => {
return component.children({ packageMeta });
},
@@ -67,7 +67,7 @@ describe('<Dist /> component', () => {
},
},
};
jest.doMock('../../pages/version/Version', () => ({
jest.doMock('../../pages/Version', () => ({
DetailContextConsumer: component => {
return component.children({ packageMeta });
},

View File

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import List from '@material-ui/core/List';
import { DetailContextConsumer, VersionPageConsumerProps } from '../../pages/version/Version';
import { VersionPageConsumerProps, DetailContextConsumer } from '../../pages/Version';
import { Heading, DistListItem, DistChips } from './styles';
import fileSizeSI from '../../utils/file-size';
import { PackageMetaInterface } from 'types/packageMeta';