issues
search
iTowns
/
itowns
A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.09k
stars
293
forks
source link
rework unit tests (mocking the fetch())
#2183
Closed
ftoromanoff
closed
5 months ago
ftoromanoff
commented
1 year ago
This PR propose a rewrite of the unit tests:
minor corrections in tests
mocking of the 'fetch()' function to have unit tests to run independent from network
to do that the files that should have been fetch have been added localy.
we use sinon to mock itowns.Fetcher
add a file test for testing Fetcher.js
Modifications:
add 'sinon' library to do the mocking
all tests
add all test files in local folder test/data/unitTest
change global url to local ones
add fetcher.js to test Fetcher.js
add library xml dom for xml fetcher
This PR propose a rewrite of the unit tests:
Modifications: