Closed christophfriedrich closed 5 years ago
My tests rely on the earth-engine-driver instance deployed at http://giv-openeo.uni-muenster.de:8080/v0.3 - if the URL changes (which will happen in the coming week) or the server implementation changes (likely) or the data the server proxies changes (we've got no control over that), these tests may/will fail.
Also, I experienced it's a bit tricky to test all those asynchronous functions -- if you don't pay attention it can happen that a test that should fail PASSES because the test is evaluated before the failing function has returned.
A long day of work improves the coverage to at least:
-----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
-----------|----------|----------|----------|----------|----------------|
openeo.js | 59.79 | 45.39 | 73.6 | 59.12 |... 736,740,741 |
-----------|----------|----------|----------|----------|----------------|
Lesson learned today while working with
async
,Blob
s and events at the same time:expect(...)
can throw, so that thedone()
is never called!
I think this looks fine (node tests) and can be closed:
-----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-----------|----------|----------|----------|----------|-------------------|
All files | 94.43 | 76.62 | 97.74 | 94.56 | |
openeo.js | 94.43 | 76.62 | 97.74 | 94.56 |... 71,515,531,701 |
-----------|----------|----------|----------|----------|-------------------|
I started a
tests
branch and already committed some tests (for very basic functionality, connecting, discovery and querying (empty) user data) in 167bd1126b38a2b9c7c0b55574bd047dfe6f987a, but Jest's coverage report doesn't look any good yet: