mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 20:42:52 +00:00
refactor: split api into api, api-cli & api-plugin
This commit is contained in:
@@ -39,7 +39,7 @@ export class MapAggTest {
|
||||
testInterfaceAgainstPath(options: MapAggTestOptions) {
|
||||
const template = generateTemplate(this.reflection, options.ignoredTags ?? [], false, [options.name]);
|
||||
|
||||
if (typeof options.err === 'undefined') {
|
||||
if (options.err === undefined) {
|
||||
expect(template.errors).to.be.deep.equal([], 'Unexpected Error!');
|
||||
} else {
|
||||
for (const error of template.errors) {
|
||||
@@ -47,7 +47,7 @@ export class MapAggTest {
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof options.agg !== 'undefined') {
|
||||
if (options.agg !== undefined) {
|
||||
const expectedAggSchema = MapAggTest.buildAggregation(
|
||||
options.name,
|
||||
options.agg.fields,
|
||||
@@ -56,7 +56,7 @@ export class MapAggTest {
|
||||
expect(template.aggregations).to.be.deep.equal(expectedAggSchema, 'Aggregation schema not equal!');
|
||||
}
|
||||
|
||||
if (typeof options.map !== 'undefined') {
|
||||
if (options.map !== undefined) {
|
||||
const expectedMappingSchema = MapAggTest.buildMapping(options.name, options.map);
|
||||
expect(template.mappings).to.be.deep.equal(expectedMappingSchema, 'Mapping schema not equal!');
|
||||
}
|
||||
@@ -81,7 +81,7 @@ export class MapAggTest {
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof fields === 'undefined' || fields.length === 0) {
|
||||
if (fields === undefined || fields.length === 0) {
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user