Compare commits

...

1 Commits

Author SHA1 Message Date
JianqinWang a914bb26ae ZENKO-1377: allow mock to be reusable between tests 2019-02-11 17:39:07 -08:00
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class MetadataMock {
'Content-Type': resObj['content-type'], 'Content-Type': resObj['content-type'],
}); });
} }
const resContent = resType[resObj.name]; const resContent =
JSON.parse(JSON.stringify(resType[resObj.name]));
if (resObj.resType === 'objectList') { if (resObj.resType === 'objectList') {
resContent.Contents.forEach((obj, i) => { resContent.Contents.forEach((obj, i) => {
resContent.Contents[i].value = resContent.Contents[i].value =