-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1cbee0
commit 5682ebc
Showing
16 changed files
with
524 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
bower_components/ | ||
dist | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
module.exports = {}; |
331 changes: 331 additions & 0 deletions
331
__tests__/__snapshots__/react.components.List.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,331 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`React Components List init render 1`] = ` | ||
<div | ||
className="List" | ||
onClick={[Function]} | ||
> | ||
<div> | ||
开始1 | ||
</div> | ||
<div | ||
className="ant-alert ant-alert-success ant-alert-no-icon" | ||
data-show={true} | ||
> | ||
<span | ||
className="ant-alert-message" | ||
> | ||
Success Text | ||
</span> | ||
<span | ||
className="ant-alert-description" | ||
/> | ||
</div> | ||
, | ||
<ul | ||
className="ant-timeline" | ||
> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Create a services site 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Solve initial network problems 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Technical testing 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item ant-timeline-item-last" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Network problems being solved 2015-09-01 | ||
</div> | ||
</li> | ||
</ul> | ||
, | ||
</div> | ||
`; | ||
|
||
exports[`React Components List onClick render 第一次点击 1`] = ` | ||
<div | ||
className="List" | ||
onClick={[Function]} | ||
> | ||
<div> | ||
结束 | ||
</div> | ||
<div | ||
className="ant-alert ant-alert-success ant-alert-no-icon" | ||
data-show={true} | ||
> | ||
<span | ||
className="ant-alert-message" | ||
> | ||
Success Text | ||
</span> | ||
<span | ||
className="ant-alert-description" | ||
/> | ||
</div> | ||
, | ||
<ul | ||
className="ant-timeline" | ||
> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Create a services site 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Solve initial network problems 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Technical testing 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item ant-timeline-item-last" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Network problems being solved 2015-09-01 | ||
</div> | ||
</li> | ||
</ul> | ||
, | ||
</div> | ||
`; | ||
|
||
exports[`React Components List onClick render 第二次点击 1`] = ` | ||
<div | ||
className="List" | ||
onClick={[Function]} | ||
> | ||
<div> | ||
开始1 | ||
</div> | ||
<div | ||
className="ant-alert ant-alert-success ant-alert-no-icon" | ||
data-show={true} | ||
> | ||
<span | ||
className="ant-alert-message" | ||
> | ||
Success Text | ||
</span> | ||
<span | ||
className="ant-alert-description" | ||
/> | ||
</div> | ||
, | ||
<ul | ||
className="ant-timeline" | ||
> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Create a services site 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Solve initial network problems 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Technical testing 2015-09-01 | ||
</div> | ||
</li> | ||
<li | ||
className="ant-timeline-item ant-timeline-item-last" | ||
> | ||
<div | ||
className="ant-timeline-item-tail" | ||
/> | ||
<div | ||
className="ant-timeline-item-head ant-timeline-item-head-blue" | ||
style={ | ||
Object { | ||
"borderColor": undefined, | ||
} | ||
} | ||
/> | ||
<div | ||
className="ant-timeline-item-content" | ||
> | ||
Network problems being solved 2015-09-01 | ||
</div> | ||
</li> | ||
</ul> | ||
, | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
import {sum,isEmpty} from './../src/util/index' | ||
|
||
describe('util index.js',()=>{ | ||
it('sum 1 + 2 to equal 3', () => { | ||
expect(sum(1, 2)).toBe(3); | ||
}); | ||
it('isEmpty {a:1}',()=>{ | ||
expect(isEmpty({a:1})).toBeFalsy() | ||
}) | ||
it('isEmpty {}',()=>{ | ||
expect(isEmpty({})).toBeTruthy() | ||
}) | ||
it('isEmpty []',()=>{ | ||
expect(isEmpty([])).toBeTruthy() | ||
}) | ||
it('isEmpty null',()=>{ | ||
expect(isEmpty(null)).toBeTruthy() | ||
}) | ||
it('isEmpty',()=>{ | ||
expect(isEmpty(undefined)).toBeTruthy(); | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
###运行命令 | ||
- jest //单次运行 | ||
- jest --watch //jest --watch 检测运行 | ||
- jest -u //快照覆盖 |
Oops, something went wrong.