Skip to content

Commit d208038

Browse files
committed
docs: updated changelog for release of 0.3.0
1 parent d66da15 commit d208038

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

CHANGELOG.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
## 0.3.0 (May 17, 2023)
2+
3+
### Features
4+
5+
- #### feat: added the total duration of all tests in the reported summary ([#35](https://github.com/react-gjs/gest/pull/35))
6+
7+
Report summary is now able to display one more additional information - the time it took to complete all the tests.
8+
9+
- #### feat: function mocks ([#34](https://github.com/react-gjs/gest/pull/34))
10+
11+
Added a Function Mock API, that allows to create special functions which are being tracked and can have their implementation changed at any time.
12+
13+
Mocks track information's about:
14+
- the amount of times they were called
15+
- arguments provided to each call
16+
- result given for each call
17+
- whether a call ended in a failure or not
18+
- whether the returned value was a Promise or not
19+
- number of mock calls that are still pending (unresolved promises)
20+
21+
- #### feat: added FakeTimers feature ([#33](https://github.com/react-gjs/gest/pull/33))
22+
23+
Added fake timers. To use fake timers use the global variable that globally available in all tests - `FakeTimers`.
24+
25+
**Example**
26+
27+
```ts
28+
export default describe("FakeTimers test", () => {
29+
it("timers are disabled in this test", () => {
30+
FakeTimers.enable();
31+
32+
let wasCalled = false;
33+
34+
const onTimeout = () => {
35+
wasCalled = true;
36+
}
37+
setTimeout(onTimeout); // will never run until manually triggered
38+
39+
wasCalled; // false
40+
41+
FakeTimers.runNext(); // trigger, will invoke the `onTimeout` callback
42+
43+
wasCalled; // true
44+
45+
FakeTimers.disable(); // remember to disable fake timers once the test ends
46+
})
47+
})
48+
```
49+
50+
- #### feat: reworked the stack parsing algorithm, added config option that allows for replacing this algorithm ([#32](https://github.com/react-gjs/gest/pull/32))
51+
152
## 0.2.0 (May 3, 2023)
253

354
### Features
@@ -8,7 +59,7 @@
859

960
Additionally `beforeEach` and `afterEach` hooks will now always be skipped along with the individual tests. Before those hooks could be ran before a test that was skipped.
1061

11-
- #### feat: added timouts to test units ([#27](https://github.com/react-gjs/gest/pull/27))
62+
- #### feat: added timeouts to test units ([#27](https://github.com/react-gjs/gest/pull/27))
1263

1364
Added timeouts to all unit tests. Previously the config had a timeout threshold option, but it did not do anything. If a tests hanged and did never finish `gest` would also hang. A proper timeouts are now added, by default if a single test takes longer than 5 seconds it will be marked as failed. (this does not prevent synchronous thread locks, for example a synchronous infinite loop will still lock the program)
1465

0 commit comments

Comments
 (0)