Commit Graph

13 Commits

Author SHA1 Message Date
George Kalpakas 19da73741d build(docs-infra): switch the `example-e2e` script to ESM (#42921)
Switch the JS script used for running the docs examples tests from
CommonJS to ESM format. This is necessary for upgrading the `globby`
dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42921
2021-07-23 10:37:35 -07:00
Pete Bacon Darwin e16778d371 docs: fix multicasting observable example (#42258)
The example did not allow the async sequence to be cancelled
after the first timeout had completed.

Fixes #25804

PR Close #42258
2021-05-24 18:17:34 +00:00
Kristiyan Kostadinov e86a1d3441 docs: make all examples compatible with strict mode (#41999)
Turns on the `strict` compiler flag and resolves the compilation errors in the various AIO examples.

PR Close #41999
2021-05-17 10:42:18 -07:00
Sonu Kapoor ba54671993 test(docs-infra): add unit tests for rxjs examples (#34190)
This commit adds missing unit tests for all rxjs examples from the docs.

Closes #28017

PR Close #34190
2020-09-16 15:13:02 -07:00
George Kalpakas 1db4f508e6 refactor(docs-infra): fix docs examples for tslint rules related to variable names (#38143)
This commit updates the docs examples to be compatible with the
`no-shadowed-variable` and `variable-name` tslint rules.

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close #38143
2020-07-31 11:00:06 -07:00
George Kalpakas 8660806ddc build(docs-infra): renamed `e2e` property of `example-config.json` to `tests` (#36143)
Each docs example has an `example-config.json` configuration file. Among
other things, this file can be used to specify what commands to run in
order to test the example. (If not specified, the `run-example-e2e.js`
script will run a default `yarn e2e` command.)

Previously, the property specifying the test commands was called `e2e`.
This is because in the past only e2e tests were run for docs examples.
Since recently, some examples may specify commands for other types of
tests (such as unit tests). Therefore, calling the property that holds
the list of test commands `e2e` no longer makes sense and can be
misleading to people looking at the configuration files.

This commit renamed the property to the more generic `tests`. In the
future, the `run-example-e2e.js` script (and corresponding npm script)
should be renamed and refactored to also avoid giving the impression
that only e2e tests are run.

Discussed in:
https://github.com/angular/angular/pull/36143#discussion_r395148379

PR Close #36143
2020-04-06 15:31:07 -07:00
Filipe Silva f5a4de7428 test(docs-infra): compile only app for examples with no e2e (#33717)
With TS 3.7, these examples were running into the error below (e.g. on https://circleci.com/gh/angular/angular/574906#tests/containers/0):

```
============== AIO example output for: /home/circleci/ng/aio/content/examples/observables/
running: yarn tsc --project ./
$ /home/circleci/ng/aio/content/examples/observables/node_modules/.bin/tsc --project ./
../../../tools/examples/shared/node_modules/protractor/built/index.d.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'PluginConfig'.
../../../tools/examples/shared/node_modules/protractor/built/index.d.ts(5,24): error TS2440: Import declaration conflicts with local declaration of 'ProtractorPlugin'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
completed: yarn tsc --project ./
```

This happened because of https://github.com/angular/protractor/issues/5348.

It's unclear why this typings problem does not affect `ng e2e` runs, and only affects `tsc` runs.

For now it seems sensible to alter the tests to compile only the app and not the e2e, since the intent of 2cc954d5a5 was never to verify the correctness of the e2e in the first place.

We still need a release of protractor that supports TS 3.7 though, but at least it doesn't seem to block our update proper.

PR Close #33717
2020-01-14 16:42:22 -08:00
arturovt 99cc7cdc15 docs: fix non-working example in the `Observables` section (#34705)
PR Close #34705
2020-01-09 13:27:15 -08:00
Sonu Kapoor 2cc954d5a5 test(docs-infra): ensure RxJS-related docs examples can compile without errors (#34063)
Previously, some RxJS-related examples (which are not proper Angular apps) were not
tested on CI as part of the `example-e2e` npm script. This meant that the examples
could get out-of-date or contain compile errors without as noticing.

This commit ensures that the `example-e2e` script picks up these examples and checks
that they compile successfully.

Partly addresses #28017.

PR Close #34063
2019-12-02 11:02:13 -08:00
siddhant 0bdea1f69c docs: update docs to reflect the changes in RxJS 6 (#26238)
PR Close #26238
2018-10-08 13:43:12 -07:00
Mateusz Karkula bd576bb83f docs: fix multicasting example in observable guide (#24911)
PR Close #24911
2018-07-23 08:40:45 -07:00
Igor Minar b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573)
PR Close #22573
2018-03-19 21:51:51 -07:00
Jason Aden 79656e7f96 docs(aio): add Observable and Rx docs (#21423)
PR Close #21423
2018-02-27 11:24:31 -08:00