Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Given('that the contract data is', async function (contractData) {
const dataJson = JSON.parse(contractData);
if (!this.clause) {
const templateDir = Path.resolve(Util.resolveRootDir(this.parameters),'.');
const clause = await loadClause(templateDir);
this.request = clause.getTemplate().getMetadata().getRequest();
this.clause = clause;
}
this.clause.setData(dataJson);
});