Skip to content

Commit 916dec5

Browse files
committed
update docs
1 parent 8c5945e commit 916dec5

File tree

2 files changed

+3
-39
lines changed

2 files changed

+3
-39
lines changed

docs/src/content/docs/book/compile.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,6 @@ Disable automatic test generation by adding the `skipTestGeneration` option to y
460460

461461
Since generated test files are overwritten on each compilation, copy them to a separate location before customization:
462462

463-
```shell
464-
# Copy generated tests to your project's test directory
465-
cp -r ./build/tests/ ./tests/
466-
467-
# Rename files to remove .stub suffix
468-
mv ./tests/MyProject_Counter.stub.tests.ts ./tests/MyProject_Counter.tests.ts
469-
```
470-
471463
:::note
472464

473465
See how to use the generated tests for [debugging and testing your contracts](/book/debug#tests-using-stubs).

docs/src/content/docs/book/debug.mdx

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -131,48 +131,20 @@ Whenever you create a new [Blueprint][bp] project or use the `blueprint create`
131131

132132
### Using generated test stubs {#tests-using-stubs}
133133

134-
<Badge text="Available since Tact 1.6" variant="tip" size="medium"/><p/>
134+
<Badge text="Available since Tact 1.6.14" variant="tip" size="medium"/><p/>
135135

136136
Tact automatically generates test stubs for each compiled contract during the [compilation process](/book/compile#test-stubs). These generated test files serve as excellent starting points for writing comprehensive tests.
137137

138138
To use the generated test stubs:
139139

140140
1. **Copy the generated tests** from the `output/tests/` directory to your project's `tests/` directory:
141-
```shell
142-
cp -r ./build/tests/ ./tests/
143-
```
144141

145-
2. **Rename the files** to remove the `.stub` suffix:
146-
```shell
147-
mv ./tests/MyProject_Counter.stub.tests.ts ./tests/MyProject_Counter.tests.ts
148-
```
149-
150-
3. **Customize the tests** according to your contract's specific needs. The generated stubs include:
142+
2. **Customize the tests** according to your contract's specific needs. The generated stubs include:
151143
- Basic blockchain sandbox setup
152144
- Contract deployment tests
153145
- Example usage of [TypeScript wrappers](#tests-wrappers)
154146

155-
4. **Extend with additional test cases** to cover all your contract's functionality:
156-
157-
```typescript
158-
it('should increment counter', async () => {
159-
const initialValue = await counter.getValue();
160-
161-
const incrementResult = await counter.sendIncrement(
162-
deployer.getSender(),
163-
toNano('0.01')
164-
);
165-
166-
expect(incrementResult.transactions).toHaveTransaction({
167-
from: deployer.address,
168-
to: counter.address,
169-
success: true,
170-
});
171-
172-
const newValue = await counter.getValue();
173-
expect(newValue).toBe(initialValue + 1n);
174-
});
175-
```
147+
3. **Extend with additional test cases** to cover all your contract's functionality:
176148

177149
:::tip
178150

0 commit comments

Comments
 (0)