Testing improvements (#4863)

* Adds supports-color so spec reporter dont output colors when not supported

* Adds babelrc so breakpoints dont jump around in specs

* Rename test to avoid duplicated name

* Removes unused methods

* Better naming for it_exclude
This commit is contained in:
Florent Vilmart
2018-07-01 00:00:37 -04:00
parent 7319aabf7a
commit 96bc74433b
7 changed files with 2285 additions and 2275 deletions

View File

@@ -31,22 +31,6 @@ const MongoClient = mongodb.MongoClient;
const ReadPreference = mongodb.ReadPreference;
const MongoSchemaCollectionName = '_SCHEMA';
const storageAdapterAllCollections = mongoAdapter => {
return mongoAdapter.connect()
.then(() => mongoAdapter.database.collections())
.then(collections => {
return collections.filter(collection => {
if (collection.namespace.match(/\.system\./)) {
return false;
}
// TODO: If you have one app with a collection prefix that happens to be a prefix of another
// apps prefix, this will go very very badly. We should fix that somehow.
return (collection.collectionName.indexOf(mongoAdapter._collectionPrefix) == 0);
});
});
}
const convertParseSchemaToMongoSchema = ({...schema}) => {
delete schema.fields._rperm;
delete schema.fields._wperm;

View File

@@ -31,7 +31,6 @@ export interface StorageAdapter {
createClass(className: string, schema: SchemaType): Promise<void>;
addFieldIfNotExists(className: string, fieldName: string, type: any): Promise<void>;
deleteClass(className: string): Promise<void>;
deleteAllClasses(): Promise<void>;
dropDatabase(): Promise<void>;
deleteFields(className: string, schema: SchemaType, fieldNames: Array<string>): Promise<void>;
getAllClasses(): Promise<StorageClass[]>;