Skip to content

Commit 6b0e4f0

Browse files
docs(README.md): update.
1 parent 3dadeb1 commit 6b0e4f0

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,35 @@ public expectation(actual, expected) {
300300

301301
### Nested expectations
302302

303-
Expectation methods are accessed by using nested object structure and method names.
303+
Expectation methods are accessed in `TestingExpectTo` by using nested object structure and method names.
304+
305+
Example
306+
307+
```typescript
308+
import { Testing, TestingExpectTo } from "@angular-package/testing";
309+
310+
const t = new Testing();
311+
const to = new TestingExpectTo();
312+
313+
t.describe(`TestingExpectTo`, () => t
314+
.it(`it`, () => to
315+
.contain(['a', 'b', 'c'], 'c')
316+
.contain('string number', 'ber')
317+
.equal({a: 2}, {a: 2})
318+
.match("my string", /string$/)
319+
.match('number', 'ber')
320+
321+
.not.contain(['a', 'b', 'c'], 'h')
322+
.contain(['a', 'b', 'c'], 'a')
323+
324+
.be.not.bigint('a')
325+
)
326+
);
327+
```
304328

305329
### Standalone expectations
306330

307-
Expectation methods are directly accessed by using method names instead of nested structure, but using it through the `TestingExpectTo`.
331+
Expectation methods are directly accessed in `TestingExpectation` by using method names instead of nested structure, but using it through the `TestingExpectTo`.
308332

309333
Jasmine matchers in use.
310334

0 commit comments

Comments
 (0)