test: Add test IDs (#9205)

This commit is contained in:
Manuel
2024-07-18 15:41:04 +02:00
committed by GitHub
parent 4b04c2222c
commit 901cff5edd
42 changed files with 302 additions and 282 deletions

View File

@@ -466,7 +466,11 @@ try {
}
}
// Disable test if its UUID is found in testExclusionList
/**
* Assign ID to test and run it. Disable test if its UUID is found in testExclusionList.
* @param {String} id The UUID of the test.
* @param {any} func The test function.
*/
global.it_id = (id, func) => {
if (testExclusionList.includes(id)) {
return xit;
@@ -475,6 +479,19 @@ global.it_id = (id, func) => {
}
};
/**
* Assign ID to test and run only this test. Disable test if its UUID is found in testExclusionList.
* @param {String} id The UUID of the test.
* @param {any} func The test function.
*/
global.fit_id = (id, func) => {
if (testExclusionList.includes(id)) {
return xit;
} else {
return func || fit;
}
};
global.it_only_db = db => {
if (
process.env.PARSE_SERVER_TEST_DB === db ||