diff --git a/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts b/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000000..83740c7123 --- /dev/null +++ b/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts @@ -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. + */ diff --git a/aio/content/examples/observables-in-angular/example-config.json b/aio/content/examples/observables-in-angular/example-config.json index e69de29bb2..548e66ce80 100644 --- a/aio/content/examples/observables-in-angular/example-config.json +++ b/aio/content/examples/observables-in-angular/example-config.json @@ -0,0 +1,8 @@ +{ + "e2e": [ + { + "cmd": "yarn", + "args": [ "tsc", "--project", "./" ] + } + ] +} diff --git a/aio/content/examples/observables-in-angular/src/main.ts b/aio/content/examples/observables-in-angular/src/main.ts index f010819b4d..16788a2f0e 100644 --- a/aio/content/examples/observables-in-angular/src/main.ts +++ b/aio/content/examples/observables-in-angular/src/main.ts @@ -39,9 +39,9 @@ export class ZippyComponent { Time: {{ time | async }}` }) export class AsyncObservablePipeComponent { - time = new Observable(observer => - setInterval(() => observer.next(new Date().toString()), 1000) - ); + time = new Observable(observer => { + setInterval(() => observer.next(new Date().toString()), 1000); + }); } // #enddocregion pipe diff --git a/aio/content/examples/observables/e2e/src/app.e2e-spec.ts b/aio/content/examples/observables/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000000..ac89f882d0 --- /dev/null +++ b/aio/content/examples/observables/e2e/src/app.e2e-spec.ts @@ -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/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. + */ diff --git a/aio/content/examples/observables/example-config.json b/aio/content/examples/observables/example-config.json index e69de29bb2..548e66ce80 100644 --- a/aio/content/examples/observables/example-config.json +++ b/aio/content/examples/observables/example-config.json @@ -0,0 +1,8 @@ +{ + "e2e": [ + { + "cmd": "yarn", + "args": [ "tsc", "--project", "./" ] + } + ] +} diff --git a/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts b/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000000..af10979040 --- /dev/null +++ b/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts @@ -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/practical-observable-usage/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. + */ diff --git a/aio/content/examples/practical-observable-usage/example-config.json b/aio/content/examples/practical-observable-usage/example-config.json index e69de29bb2..548e66ce80 100644 --- a/aio/content/examples/practical-observable-usage/example-config.json +++ b/aio/content/examples/practical-observable-usage/example-config.json @@ -0,0 +1,8 @@ +{ + "e2e": [ + { + "cmd": "yarn", + "args": [ "tsc", "--project", "./" ] + } + ] +} diff --git a/aio/content/examples/practical-observable-usage/src/typeahead.ts b/aio/content/examples/practical-observable-usage/src/typeahead.ts index 4bde2c66d0..153ab7f23e 100644 --- a/aio/content/examples/practical-observable-usage/src/typeahead.ts +++ b/aio/content/examples/practical-observable-usage/src/typeahead.ts @@ -1,12 +1,12 @@ - import { fromEvent } from 'rxjs'; import { ajax } from 'rxjs/ajax'; -import { map, filter, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators'; +import { debounceTime, distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators'; + const searchBox = document.getElementById('search-box'); const typeahead = fromEvent(searchBox, 'input').pipe( - map((e: KeyboardEvent) => e.target.value), + map((e: KeyboardEvent) => (e.target as HTMLInputElement).value), filter(text => text.length > 2), debounceTime(10), distinctUntilChanged(), diff --git a/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts b/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000000..015034d09e --- /dev/null +++ b/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts @@ -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/rx-libary/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. + */ diff --git a/aio/content/examples/rx-library/example-config.json b/aio/content/examples/rx-library/example-config.json index e69de29bb2..548e66ce80 100644 --- a/aio/content/examples/rx-library/example-config.json +++ b/aio/content/examples/rx-library/example-config.json @@ -0,0 +1,8 @@ +{ + "e2e": [ + { + "cmd": "yarn", + "args": [ "tsc", "--project", "./" ] + } + ] +} diff --git a/aio/tools/examples/shared/package.json b/aio/tools/examples/shared/package.json index d233f50504..14ad2711d2 100644 --- a/aio/tools/examples/shared/package.json +++ b/aio/tools/examples/shared/package.json @@ -58,8 +58,8 @@ "@types/express": "^4.0.35", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "^2.0.4", - "@types/jquery": "^3.3.4", - "@types/node": "~8.9.4", + "@types/jquery":"3.3.28", + "@types/node":"~12.12.14", "canonical-path": "1.0.0", "concurrently": "^3.0.0", "http-server": "^0.11.1", diff --git a/aio/tools/examples/shared/yarn.lock b/aio/tools/examples/shared/yarn.lock index fbc57780f8..798e85b347 100644 --- a/aio/tools/examples/shared/yarn.lock +++ b/aio/tools/examples/shared/yarn.lock @@ -443,9 +443,12 @@ dependencies: "@types/jasmine" "*" -"@types/jquery@^3.3.4": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.4.tgz#f1850fb9a70041a14ace4f81a7ed782db8548317" +"@types/jquery@3.3.28": + version "3.3.28" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.28.tgz#e4e4e1a72a890b9d5fce34019d961265dd1394c4" + integrity sha512-6+0asQBU38H5kdoKvxVGE7fY8JREBgQsxONw0na0noV9D3JLN2+odBPKkTvRcLW20xSNiP8BH0nyl+8PcIHYNw== + dependencies: + "@types/sizzle" "*" "@types/mime@*": version "2.0.0" @@ -465,9 +468,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.3.tgz#7c6b0f8eaf16ae530795de2ad1b85d34bf2f5c58" integrity sha512-wp6IOGu1lxsfnrD+5mX6qwSwWuqsdkKKxTN4aQc4wByHAKZJf9/D4KXPQ1POUjEbnCP5LMggB0OEFNY9OTsMqg== -"@types/node@~8.9.4": - version "8.9.5" - resolved "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz#162b864bc70be077e6db212b322754917929e976" +"@types/node@~12.12.14": + version "12.12.14" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.14.tgz#1c1d6e3c75dba466e0326948d56e8bd72a1903d2" + integrity sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA== "@types/q@^0.0.32": version "0.0.32" @@ -484,6 +488,11 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" +"@types/sizzle@*": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" + integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"