angular/aio/content/examples/testing
shejialuo 6e0481572f docs(docs-infra): change the testing guide due to deprecation (#44674)
The jasmine used in the docs is

```typescript
expect(<variableName>).<matcher>(predicate, failOutput)
```

The new version should be

```typescript
expect(<variableName>).withContext(failOutput).<matcher>(predicate)
```

So, this commit mainly focuses on changing the former to latter with
format below

```typescript
expect(<variableName>)
  .withContext(failOutput)
  .<matcher>(predicate)
```

And for RxJs, see https://rxjs.dev/deprecations/subscribe-arguments.

> For example someone could name functions poorly and confuse the next
reader: `source$.subscribe(doSomething, doSomethingElse, lol)` with that
signature, you have to know unapparent details about subscribe, where
using a partial observer solves that neatly: `source$.subscribe({ next:
doSomething, error: doSomethingElse, complete: lol }`).

This commit also does this conversion.

Last, remove the unused imported `async` from file
`twain.component.marbles.spec.ts`.

PR Close #44674
2022-01-13 12:46:24 -08:00
..
e2e/src docs: make all examples compatible with strict mode (#41999) 2021-05-17 10:42:18 -07:00
src docs(docs-infra): change the testing guide due to deprecation (#44674) 2022-01-13 12:46:24 -08:00
example-config.json build(docs-infra): update docs examples to Angular v12.1.3 (#42949) 2021-08-09 09:41:00 -07:00
stackblitz.json build(docs-infra): remove link to custom Stackblitz for running tests (#44085) 2021-11-08 18:12:16 +00:00