From 164cd274a495263c08f7b19601a0f78ed25bf852 Mon Sep 17 00:00:00 2001 From: Sonu Kapoor Date: Sat, 22 Aug 2020 13:16:17 +0300 Subject: [PATCH] test(docs-infra): add commands to run the unit tests (#34537) This commit adds the necessary custom commands to run the tests in a node environment. PR Close #34537 --- .../comparing-observables/e2e/src/app.e2e-spec.ts | 9 +++++++++ .../comparing-observables/example-config.json | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts create mode 100644 aio/content/examples/comparing-observables/example-config.json diff --git a/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts b/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000000..ac89f882d0 --- /dev/null +++ b/aio/content/examples/comparing-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/comparing-observables/example-config.json b/aio/content/examples/comparing-observables/example-config.json new file mode 100644 index 0000000000..3aa2059b4d --- /dev/null +++ b/aio/content/examples/comparing-observables/example-config.json @@ -0,0 +1,12 @@ +{ + "tests": [ + { + "cmd": "yarn", + "args": ["tsc", "--project", "tsconfig.spec.json", "--module", "commonjs"] + }, + { + "cmd": "yarn", + "args": ["jasmine", "out-tsc/**/*.spec.js"] + } + ] +}