feat: tests

This commit is contained in:
2023-04-21 12:08:35 +02:00
parent 8cb9285462
commit d8c79256c9
140 changed files with 2100 additions and 2693 deletions

View File

@@ -12,7 +12,6 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Logger} from '@openstapps/logger';
import {readdirSync, statSync} from 'fs';
import path from 'path';
import {MapAggTest} from './mapping-model/map-agg-test.js';
@@ -48,8 +47,8 @@ describe('ES Aggregation Gen', async () => {
it(test.testName, function () {
magAppInstance.testInterfaceAgainstPath(test);
});
} catch (error: any) {
await Logger.error('UNHANDLED REJECTION', error.stack);
} catch (error) {
console.error('UNHANDLED REJECTION', (error as any).stack);
process.exit(1);
}
}

View File

@@ -12,7 +12,6 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {ThingType} from './types.js';
import {MapAggTestOptions} from '../../map-agg-test-options.js';

View File

@@ -54,7 +54,7 @@ export const testConfig: MapAggTestOptions = {
dynamic: 'strict',
properties: {
baz: {
type: 'float',
type: ElasticsearchDataType.float,
},
},
},

View File

@@ -12,7 +12,6 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Logger} from '@openstapps/logger';
import {readdirSync, statSync} from 'fs';
import path from 'path';
import {MapAggTest} from './mapping-model/map-agg-test.js';
@@ -49,8 +48,8 @@ describe('ES Mapping Gen', async () => {
it(test.testName, function () {
magAppInstance.testInterfaceAgainstPath(test);
});
} catch (error: any) {
await Logger.error('UNHANDLED REJECTION', error.stack);
} catch (error) {
console.error('UNHANDLED REJECTION', (error as any).stack);
process.exit(1);
}
}