Refactor cloud code tests (#1837)
* Move cloud code tests * Remove _removeHook calls that are no longer necessary * Use Strict
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Parse } from 'parse/node';
|
||||
import { Parse } from 'parse/node';
|
||||
import * as triggers from '../triggers';
|
||||
|
||||
function validateClassNameForTriggers(className) {
|
||||
@@ -40,12 +40,16 @@ ParseCloud.afterDelete = function(parseClass, handler) {
|
||||
var className = getClassName(parseClass);
|
||||
triggers.addTrigger(triggers.Types.afterDelete, className, handler, Parse.applicationId);
|
||||
};
|
||||
|
||||
|
||||
ParseCloud._removeHook = function(category, name, type, applicationId) {
|
||||
applicationId = applicationId || Parse.applicationId;
|
||||
triggers._unregister(applicationId, category, name, type);
|
||||
};
|
||||
|
||||
ParseCloud._removeAllHooks = () => {
|
||||
triggers._unregisterAll();
|
||||
}
|
||||
|
||||
ParseCloud.httpRequest = require("./httpRequest");
|
||||
|
||||
module.exports = ParseCloud;
|
||||
|
||||
Reference in New Issue
Block a user