Skip to content
20 changes: 20 additions & 0 deletions spec/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,26 @@ global.it_exclude_dbs = excluded => {
}
};

let testExclusionList = [];
try {
// Fetch test exclusion list
testExclusionList = require('./testExclusionList.json');
console.log(`Using test exclusion list with ${testExclusionList.length} entries`);
} catch(error) {
if(error.code !== 'MODULE_NOT_FOUND') {
throw error;
}
}

// Disable test if its UUID is found in testExclusionList
global.it_id = id => {
if (testExclusionList.includes(id)) {
return xit;
} else {
return it;
}
};

global.it_only_db = db => {
if (
process.env.PARSE_SERVER_TEST_DB === db ||
Expand Down