Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated geocoder logic and added simple mounting test
Signed-off-by: Giuseppe Macri <macri.giuseppe@gmail.com>
- Loading branch information
1 parent
2051ce1
commit 862e189
Showing
3 changed files
with
38 additions
and
3 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
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,27 @@ | ||
import React from 'react'; | ||
import sinon from 'sinon'; | ||
import test from 'tape'; | ||
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils'; | ||
import GeoCoder from 'components/geocoder/geocoder'; | ||
|
||
test('GeoCoder - render', t => { | ||
const geocodeForward = sinon.spy(); | ||
const onSelected = sinon.spy(); | ||
const onDeleteMarker = sinon.spy(); | ||
const width = 500; | ||
|
||
t.doesNotThrow(() => { | ||
mountWithTheme( | ||
<IntlWrapper> | ||
<GeoCoder | ||
mapboxClient={{geocodeForward}} | ||
onSelected={onSelected} | ||
onDeleteMarker={onDeleteMarker} | ||
width={width} | ||
/> | ||
</IntlWrapper> | ||
); | ||
}, 'Should render'); | ||
|
||
t.end(); | ||
}); |
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