Skip to content

Commit

Permalink
adding api-tests suite
Browse files Browse the repository at this point in the history
  • Loading branch information
amyfromandi committed Sep 12, 2024
1 parent 557e0da commit 5626dc5
Show file tree
Hide file tree
Showing 44 changed files with 5,447 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api-tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
start:
npm install
npm test
62 changes: 62 additions & 0 deletions api-tests/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
var settings = require("./settings");
//import { toExport as settings } from "./settings";
//var app = require("../../server.ts");
//import { app } from "../../server";
var request = require("supertest");

import * as fs from 'fs';
import * as path from 'path';

// List of all the test files you want to import
const testFiles = [
'carto_small.ts',
'columns.ts',
'defs.ts',
'defs_columns.ts',
'defs_econs.ts',
'defs_environments.ts',
'defs_groups.ts',
'defs_intervals.ts',
'defs_lithologies.ts',
'defs_lithology_attributes.ts',
'defs_measurements.ts',
'defs_minerals.ts',
'defs_plates.ts',
'defs_projects.ts',
'defs_refs.ts',
'defs_sources.ts',
'defs_strat_name_concepts.ts',
'defs_strat_names.ts',
'defs_structures.ts',
'defs_timescales.ts',
'fossils.ts',
'geologic_units_burwell.ts',
'geologic_units_gmna.ts',
'geologic_units_gmus.ts',
'index.ts',
'mancos_test_cases.ts',
'mobile_fossil_collections.ts',
'mobile_macro_summary.ts',
'mobile_map_query.ts',
'mobile_point.ts',
'mobile_point_details.ts',
'paleogeography.ts',
'root.ts',
'sections.ts',
'stats.ts',
'tiles.ts',
'units.ts'
];

// Path to the v2Tests directory
const testDir = path.join(__dirname, 'v2Tests');

// Mocha `describe` block to group all tests
describe('API Tests', function () {
// Iterate through the test files and require each one
testFiles.forEach((file) => {
console.log(`Loading test file: ${file}`);
require(path.join(testDir, file)); // Dynamically require each test file
});
});

Loading

0 comments on commit 5626dc5

Please sign in to comment.