Files
directus/tests/blackbox/common/common.seed.ts
Pascal Jufer 15b91dee34 Blackbox tests restructuring (#18122)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 18:28:37 +02:00

22 lines
710 B
TypeScript

import vendors from '@common/get-dbs-to-test';
import { DeleteCollection } from '@common/functions';
export const collectionName = 'common_test_collection';
export const collectionNameM2O = 'common_test_collection_m2o';
export const collectionNameO2M = 'common_test_collection_o2m';
export const seedDBStructure = () => {
it.each(vendors)('%s', async (vendor) => {
try {
// Delete existing collections
await DeleteCollection(vendor, { collection: collectionNameO2M });
await DeleteCollection(vendor, { collection: collectionNameM2O });
await DeleteCollection(vendor, { collection: collectionName });
expect(true).toBeTruthy();
} catch (error) {
expect(error).toBeFalsy();
}
});
};