test2.ts
Test 2: Test Token Trading
import { executeTrade } from "../src/trade";
import assert from "assert";
describe("Token Trading Tests", () => {
it("should execute a trade successfully", async () => {
const tradeDetails = {
token: "TST",
amount: 100,
action: "buy",
};
const result = await executeTrade(tradeDetails);
assert.ok(result);
assert.strictEqual(result.action, tradeDetails.action);
assert.strictEqual(result.token, tradeDetails.token);
});
});
Last updated