使用 Blueprint 编写测试
概览
测试工具包(通常是沙盒)已经包含在名为Blueprint的TypeScript SDK中。您可以创建一个演示项目并通过两个步骤启动默认测试:
- 创建一个新的Blueprint项目:
npm create ton@latest MyProject
- 运行测试:
cd MyProject
npx blueprint test
然后,您将在终端窗口中看到相应的输出:
% npx blueprint test
> [email protected] test
> jest
PASS tests/Main.spec.ts
Main
✓ should deploy (127 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 1.224 s, estimated 2 s
Ran all test suites.