test: improve coverage of tests for e2e

This commit is contained in:
Michel Jonathan Schmitz
2019-05-21 13:36:01 +02:00
parent ec6296a606
commit aadd424400
2 changed files with 11 additions and 0 deletions

View File

@@ -111,4 +111,11 @@ export class E2EConnectorSpec {
return indexSamples(httpClient, {to: 'http://localhost', samples: './node_modules/@openstapps/core/test/resources'})
.should.be.rejectedWith(ApiError);
}
@test
async indexShouldFailDirectoryWithoutData() {
return indexSamples(httpClient, {to: 'http://localhost', samples: './test/emptyDir/'})
.should.be.rejectedWith('Could not index samples. None were retrived from the file system.');
}
}

4
test/emptyDir/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore