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:
@@ -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;
|
||||
|
||||
@@ -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[]>;
|
||||
|
||||
Reference in New Issue
Block a user