(contract)
| 93 | } |
| 94 | |
| 95 | save(contract) { |
| 96 | if (!(contract instanceof Contract)) contract = new Contract(contract); |
| 97 | const dir = contractDir(contract.id, this.cwd); |
| 98 | fs.mkdirSync(dir, { recursive: true }); |
| 99 | writeAtomic(statePath(contract.id, this.cwd), JSON.stringify(contract.toJSON(), null, 2) + '\n'); |
| 100 | writeAtomic(path.join(dir, 'contract.md'), renderContractMd(contract)); |
| 101 | writeAtomic(path.join(dir, 'assertions.md'), renderAssertionsMd(contract)); |
| 102 | } |
| 103 | |
| 104 | list() { |
| 105 | const root = contractsDir(this.cwd); |
no test coverage detected