mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
test: add unit tests to pipeline
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
||||
SCThingUpdateRoute,
|
||||
} from '@openstapps/core';
|
||||
import moment from 'moment';
|
||||
import clone = require('rfdc');
|
||||
import clone from 'rfdc';
|
||||
import {v5} from 'uuid';
|
||||
import {Bulk} from './bulk.js';
|
||||
import {Client} from './client.js';
|
||||
@@ -210,12 +210,12 @@ export class ConnectorClient extends Client {
|
||||
* @see ConnectorClient.bulk
|
||||
*/
|
||||
async index<T extends SCThings>(things: T[], source?: string, timeout?: number): Promise<void> {
|
||||
// check that number of things is not zero
|
||||
// check that the number of things is not zero
|
||||
if (things.length === 0) {
|
||||
throw new EmptyBulkError();
|
||||
}
|
||||
|
||||
// set default source if none is given
|
||||
// set the default source if none is given
|
||||
const thingSource = typeof source === 'undefined' ? 'stapps-api' : source;
|
||||
|
||||
// request a new bulk
|
||||
|
||||
Reference in New Issue
Block a user