Skip to content

Commit c88f1ad

Browse files
committed
update docs
1 parent 8966805 commit c88f1ad

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/api-documents/configuration.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,25 @@ There are 2 useful fields.
7676
- `log`: redirect log message from test cases to unittest framework. It will be showed in failed info.
7777
::: details
7878

79+
as-test.config.js:
80+
```javascript
81+
module.exports = {
82+
imports(runtime) {
83+
return {
84+
env: {
85+
log: (msg) => {
86+
runtime.framework.log(runtime.exports.__getString(msg));
87+
},
88+
},
89+
};
90+
},
91+
}
92+
```
93+
94+
unit test:
7995
```typescript
96+
import { log } from "./env";
97+
8098
test("failed test", () => {
8199
log("This is a log message for the failed test."); // log to be redirect
82100
expect(1 + 1).equal(3);

docs/release-note.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
- Expose the framework's `log` function in the configuration file, and the logs redirected to this function will be appended to the final test report.
1313
- Support test crashes and provide good call stack information.
1414

15+
Improvements
16+
17+
- Code coverage calculation.
18+
- Skip type definitions.
19+
- Treat switch case correctly.
20+
- Reduced test execution time and memory overhead.
21+
1522
🔄 Arch Changes
1623

1724
- During testing, the framework will execute all `test` functions once, but will not trigger callbacks, thereby collecting all test cases and then executing the test cases in sequence.

0 commit comments

Comments
 (0)