Skip to content

Commit b569103

Browse files
committed
docs: update API documentation
1 parent fb763c4 commit b569103

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

docs/api.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,11 @@ A promise if `runSuite` is asynchronous, `void` otherwise.
137137
```ts
138138
// Synchronous
139139
const isEven = (num: number) => num % 2 === 0;
140-
141140
describe("isEven", it => {
142141
it("should return true for multiples of 2", expect => {
143142
expect(isEven(2), toEqual(true));
144143
expect(isEven(100), toEqual(true));
145144
});
146-
147145
it("should return true for 0", expect => {
148146
expect(isEven(0), toEqual(true));
149147
});
@@ -162,7 +160,6 @@ const delay = timeMilliseconds => {
162160
setTimeout(() => resolve(), timeMilliseconds);
163161
});
164162
};
165-
166163
await describe("delay", async it => {
167164
await it("should delay by 1s", async expect => {
168165
const time = performance.now();
@@ -205,7 +202,6 @@ expect(true, toEqual(true)); // PASSED
205202
const reject = () => {
206203
return new Promise((_, reject) => reject(new Error()));
207204
};
208-
209205
await expect(reject, toReject(Error)); // PASSED
210206
```
211207

@@ -230,7 +226,6 @@ A promise if `test` is asynchronous, `void` otherwise.
230226
```ts
231227
// Synchronous
232228
const isEven = (num: number) => num % 2 === 0;
233-
234229
it("returns true if number is even", expect => {
235230
expect(isEven(2), toEqual(true)); // PASSED
236231
// More expect
@@ -248,7 +243,6 @@ const delay = timeMilliseconds => {
248243
setTimeout(() => resolve(), timeMilliseconds);
249244
});
250245
};
251-
252246
await it("should delay by 1000ms", async expect => {
253247
const time = performance.now();
254248
await delay(1000);
@@ -281,7 +275,6 @@ mod("Math", describe => {
281275
expect(isEven(2), toEqual(true));
282276
expect(isEven(1000), toEqual(true));
283277
});
284-
285278
it("should return true for 0", expect => {
286279
expect(isEven(0), toEqual(true));
287280
});
@@ -697,7 +690,6 @@ with the error returned by `Err`.
697690
const reject = () => {
698691
return new Promise((_, reject) => reject(new Error("Error occurred")));
699692
};
700-
701693
expect(reject, toReject()); // PASSED
702694
expect(reject, toReject(Error, "TypeError occurred")); // FAILED
703695
```
@@ -726,7 +718,6 @@ If `Err` is provided, it also checks if the error thrown matches `Err`.
726718
const throwError = () => {
727719
throw new Error();
728720
};
729-
730721
expect(throwError, toThrow(Error)); // PASSED
731722
expect(throwError, toThrow(Error, "An unknown error occurred")); // FAILED
732723
```

0 commit comments

Comments
 (0)