Skip to content

Commit

Permalink
Merge pull request #840 from XiaoMi/feature/re-dev
Browse files Browse the repository at this point in the history
feat: node version
  • Loading branch information
solarjoker authored Dec 25, 2019
2 parents 062bd4b + bf821a6 commit 69ce6ba
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 22,702 deletions.
4 changes: 3 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ $ npm start

### 单元测试

```
```sh
# require node version >= 10

$ npm run jest:coverage
```

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ $ npm start

Open http://localhost:4200

### Unit Testing
### Unit Testing

```sh
# require node version >= 10

```
$ npm run jest:coverage
```

Expand Down
3 changes: 0 additions & 3 deletions components/card/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ describe('Card', () => {
expect(firstCard.state().extraShow).toBeFalsy()
})

// NOTE 将要废弃 添加 it.skip
it('extraShow', () => {
const extraShows = [
'hover',
Expand All @@ -77,7 +76,6 @@ describe('Card', () => {
expect(firstCard.state().extraShow).toEqual(false)
})

// NOTE 将要废弃 添加 it.skip
it('disabled', () => {
const wrapper = mount(
<Card disabled={true} />
Expand Down Expand Up @@ -108,7 +106,6 @@ describe('Card', () => {
expect(wrapper.text()).toEqual(expect.stringContaining(content))
})

// NOTE 将要废弃 添加 it.skip
it('description', () => {
const description = 'custom-description'

Expand Down
13 changes: 0 additions & 13 deletions components/cascader/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,6 @@ describe('Cascader', () => {
expect(wrapper.find('input').prop('placeholder')).toEqual(placeholder)
})

// NOTE emptyContent 没有展示预期内容
it.skip('emptyContent', () => {
const emptyContent = 'custom-emptyContent'
const wrapper = mount(
<CascaderProvider {...{data, emptyContent}} />
)

wrapper.find('.hi-cascader__input-keyword').simulate('click')
expect(document.querySelectorAll('.hi-cascader-menu')[0].innerHTML).toEqual(expect.stringContaining(emptyContent))

wrapper.unmount()
})

it('style', () => {
const style = {
color: '#ffff00'
Expand Down
39 changes: 0 additions & 39 deletions components/table/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,12 @@ describe('Table', () => {
expect(wrapper.find(`Row`)).toHaveLength(dataLength)
})

// NOTE useFixedHeader 源码中未使用
it.skip('useFixedHeader', () => {})

it('columns', () => {
const wrapper = mount(<Table {...{columns}} />)

expect(wrapper.find(`.hi-table-thead`)).toHaveLength(1)
})

// NOTE bodyStyle 源码中未使用
it.skip('bodyStyle', () => {})

it('style', () => {
const style = {
color: '#ffff00'
Expand All @@ -120,38 +114,5 @@ describe('Table', () => {

expect(wrapper.find(`TableContent`).prop('style')).toMatchObject(style)
})

// NOTE rowKey 源码中未使用
it.skip('rowKey', () => {})

// NOTE rowClassName 源码中未使用
it.skip('rowClassName', () => {})

// NOTE onRow 源码中未使用
it.skip('onRow', () => {})

// NOTE onHeaderRow 源码中未使用
it.skip('onHeaderRow', () => {})

// NOTE onRowDoubleClick 源码中未使用
it.skip('onRowDoubleClick', () => {})

// NOTE onRowContextMenu 源码中未使用
it.skip('onRowContextMenu', () => {})

// NOTE onRowMouseEnter 源码中未使用
it.skip('onRowMouseEnter', () => {})

// NOTE onRowMouseLeave 源码中未使用
it.skip('onRowMouseLeave', () => {})

// NOTE showHeader 源码中未使用
it.skip('showHeader', () => {})

// NOTE title 源码中未使用
it.skip('title', () => {})

// NOTE id 源码中未使用
it.skip('id', () => {})
})
})
Loading

0 comments on commit 69ce6ba

Please sign in to comment.