Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("case: parameters is a non-empty object", async () => {
const operationLog = {
id: "id",
operation: Operation.createApp,
parameters: { key: "value" },
performedBy: "performedBy",
performedAt: new Date()
};
await storages.operationLogs.createOne(operationLog);
const foundOperationLogs = await storages.operationLogs.findMany();
expect(foundOperationLogs).to.deep.equal([operationLog]);
});
});
it("case: parameters is an empty object", async () => {
const operationLog = {
id: "id",
operation: Operation.createApp,
parameters: {},
performedBy: "performedBy",
performedAt: new Date()
};
await storages.operationLogs.createOne(operationLog);
const foundOperationLogs = await storages.operationLogs.findMany();
expect(foundOperationLogs).to.deep.equal([operationLog]);
});