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
This commit is contained in:

committed by
Miško Hevery

parent
4e766b8e0c
commit
2f8bbec6af
@ -0,0 +1,9 @@
|
||||
/*
|
||||
* This example project is special in that it is not a cli app. To run tests appropriate for this
|
||||
* project, the test command is overwritten in `aio/content/examples/observables-in-angular/example-config.json`.
|
||||
*
|
||||
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
|
||||
* tests for this project.
|
||||
*
|
||||
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
|
||||
*/
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"e2e": [
|
||||
{
|
||||
"cmd": "yarn",
|
||||
"args": [ "tsc", "--project", "./" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ export class ZippyComponent {
|
||||
Time: {{ time | async }}</div>`
|
||||
})
|
||||
export class AsyncObservablePipeComponent {
|
||||
time = new Observable(observer =>
|
||||
setInterval(() => observer.next(new Date().toString()), 1000)
|
||||
);
|
||||
time = new Observable<string>(observer => {
|
||||
setInterval(() => observer.next(new Date().toString()), 1000);
|
||||
});
|
||||
}
|
||||
|
||||
// #enddocregion pipe
|
||||
|
Reference in New Issue
Block a user