-
Notifications
You must be signed in to change notification settings - Fork 0
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
wangxingkang
committed
Jun 24, 2019
1 parent
ac5cc30
commit e84e21c
Showing
2 changed files
with
21 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { mount } from 'enzyme'; | ||
import React from 'react'; | ||
import Camera from './camera'; | ||
|
||
describe('Camera', () => { | ||
it('Turning a Todo item into Done', () => { | ||
let imgBase64 = undefined; | ||
const handlePhotograph = (base64) => { | ||
imgBase64 = base64; | ||
console.log(base64) | ||
}; | ||
|
||
const camera = mount(<Camera onPhotograph={handlePhotograph} />); | ||
const button = camera.find('button').at(0); | ||
|
||
button.simulate('click'); | ||
|
||
expect(typeof imgBase64 === 'string').toEqual(true); | ||
}) | ||
}); |
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