-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Expand file tree
/
Copy pathsmoke.test.js
More file actions
26 lines (21 loc) · 897 Bytes
/
smoke.test.js
File metadata and controls
26 lines (21 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { describe, expect, test } from "bun:test";
import { readFileSync } from "node:fs";
import { join } from "node:path";
const root = import.meta.dir;
const read = (path) => readFileSync(join(root, path), "utf8");
describe("Trader example shell", () => {
test("mounts the Vite app and renders the trading workflow panels", () => {
expect(read("index.html")).toContain('<div id="root"></div>');
const app = read("src/App.tsx");
expect(app).toContain("<WalletSetup");
expect(app).toContain("<TradingPanel");
expect(app).toContain("<PositionList");
expect(app).toContain("<TradeHistory");
});
test("defaults runtime initialization to paper trading", () => {
const app = read("src/App.tsx");
expect(app).toContain('tradingMode: "paper"');
expect(app).toContain("Only trade with");
expect(app).toContain("funds you can afford to lose");
});
});