Also monkey-patching cds.load

This commit is contained in:
Daniel
2020-08-19 10:06:36 +02:00
parent 039f62209c
commit 332fae3761

View File

@@ -150,5 +150,9 @@ if (!cds.test) { // monkey patching cds
*/
Object.defineProperties (Test.run, Object.getOwnPropertyDescriptors (Test.prototype))
Object.defineProperty (cds, 'test', {value:Test.run})
const cds_load = cds.load; cds.load = (models,o)=>{
if (typeof models === 'string') models = models.split(',')
return cds_load.call(cds,models,o)
}
}