refactor: update all

This commit is contained in:
openstappsbot
2021-09-27 13:07:35 +00:00
committed by Rainer Killinger
parent 8cb4ee12a6
commit 26c14fa7e9
6 changed files with 345 additions and 574 deletions

View File

@@ -24,7 +24,6 @@ import {
SCBulkRoute,
SCSearchResponse,
SCSearchRoute,
SCThing,
SCThings,
} from '@openstapps/core';
import chai from 'chai';
@@ -66,18 +65,12 @@ export class E2EConnectorSpec {
async getCoreTestSamples() {
const items = await getItemsFromSamples('./node_modules/@openstapps/core/test/resources');
// tslint:disable-next-line: no-unused-expression
chai.expect(items).to.not.be.a.instanceof(Error);
// tslint:disable-next-line: no-unused-expression
chai.expect(items).to.not.be.empty;
}
@test
async getCoreTestSamplesShouldFail() {
return getItemsFromSamples('./nonexistantdirectory')
.then(<T extends SCThing>(items: T[]) => {
// tslint:disable-next-line: no-unused-expression
chai.expect(items).to.be.a.instanceof(Error);
});
await chai.expect(getItemsFromSamples('./nonexistantdirectory')).to.be.rejectedWith(Error);
}
@test