Skip to content

Commit

Permalink
test(docs-infra): compile only app for examples with no e2e
Browse files Browse the repository at this point in the history
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 angular/protractor#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 angular@2cc954d 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.
  • Loading branch information
filipesilva committed Jan 8, 2020
1 parent 710b748 commit 68899fa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
"args": [ "tsc", "--project", "./tsconfig.app.json" ]
}
]
}
2 changes: 1 addition & 1 deletion aio/content/examples/observables/example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
"args": [ "tsc", "--project", "./tsconfig.app.json" ]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
"args": [ "tsc", "--project", "./tsconfig.app.json" ]
}
]
}
2 changes: 1 addition & 1 deletion aio/content/examples/rx-library/example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
"args": [ "tsc", "--project", "./tsconfig.app.json" ]
}
]
}

0 comments on commit 68899fa

Please sign in to comment.