From aadd42440056a0f994c3ab516c966f18171e1589 Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Tue, 21 May 2019 13:36:01 +0200 Subject: [PATCH] test: improve coverage of tests for e2e --- test/e2e.spec.ts | 7 +++++++ test/emptyDir/.gitignore | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 test/emptyDir/.gitignore diff --git a/test/e2e.spec.ts b/test/e2e.spec.ts index 6cfe94d7..7cca2656 100644 --- a/test/e2e.spec.ts +++ b/test/e2e.spec.ts @@ -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.'); + } + } diff --git a/test/emptyDir/.gitignore b/test/emptyDir/.gitignore new file mode 100644 index 00000000..86d0cb27 --- /dev/null +++ b/test/emptyDir/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file