New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add typescript test for our typings #9096
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"target": "es5" | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
"node_modules", | ||
"typings-test" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import * as compiler from '@angular/compiler'; | ||
import * as compiler_cli from '@angular/compiler-cli'; | ||
import * as compilerTesting from '@angular/compiler/testing'; | ||
import * as coreTesting from '@angular/core'; | ||
import * as core from '@angular/core/testing'; | ||
import * as httpTesting from '@angular/http'; | ||
import * as http from '@angular/http/testing'; | ||
import * as platformBrowserTesting from '@angular/platform-browser'; | ||
import * as platformBrowserDynmic from '@angular/platform-browser-dynamic'; | ||
import * as platformBrowser from '@angular/platform-browser/testing'; | ||
import * as platfomrServerTesting from '@angular/platform-server'; | ||
import * as platfomrServer from '@angular/platform-server/testing'; | ||
import * as router from '@angular/router'; | ||
import * as routerDeprecatedTesting from '@angular/router-deprecated'; | ||
import * as routerDeprecated from '@angular/router-deprecated/testing'; | ||
import * as routerTesting from '@angular/router/testing'; | ||
import * as upgrade from '@angular/upgrade'; | ||
|
||
export default { | ||
compiler, | ||
compilerTesting, | ||
compiler_cli, | ||
core, | ||
coreTesting, | ||
http, | ||
httpTesting, | ||
platformBrowser, | ||
platformBrowserTesting, | ||
platformBrowserDynmic, | ||
platfomrServer, | ||
platfomrServerTesting, | ||
router, | ||
routerTesting, | ||
routerDeprecated, | ||
routerDeprecatedTesting, | ||
upgrade | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
set -ex -o pipefail | ||
|
||
# These ones can be `npm link`ed for fast development | ||
LINKABLE_PKGS=( | ||
$(pwd)/dist/packages-dist/{common,core,compiler,compiler-cli,http,router,router-deprecated,upgrade,platform-{browser,browser-dynamic,server}} | ||
) | ||
|
||
TMPDIR=${TMPDIR:-/tmp/angular-build/} | ||
readonly TMP=$TMPDIR/typings-test.$(date +%s) | ||
mkdir -p $TMP | ||
cp -R -v tools/typings-test/* $TMP | ||
|
||
# run in subshell to avoid polluting cwd | ||
( | ||
cd $TMP | ||
# create package.json so that npm install doesn't pollute any parent node_modules's directory | ||
npm init --yes | ||
npm install ${LINKABLE_PKGS[*]} | ||
npm install @types/es6-promise @types/es6-collections @types/jasmine rxjs@5.0.0-beta.6 | ||
npm install typescript@1.8.10 | ||
$(npm bin)/tsc --version | ||
$(npm bin)/tsc -p tsconfig.json | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"outDir": "../../dist/typing-test/", | ||
"rootDir": ".", | ||
"target": "es5" | ||
}, | ||
"files": [ | ||
"include-all.ts", | ||
"node_modules/@types/es6-promise/index.d.ts", | ||
"node_modules/@types/es6-collections/index.d.ts", | ||
"node_modules/@types/jasmine/index.d.ts" | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this copy-paste is sad and slow - my intent was that we do one e2e test fixture setup, where we install the npm packages to a tmpdir, then we could run all the e2e tests, including typechecking, offline compilation, etc in that place.
What do you think?
(to be clear, I don't have time to make the change right now but would put it on a someday-good-intentions list)