-
Notifications
You must be signed in to change notification settings - Fork 46
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
Backport Inject Testing Helper #166
Open
aciccarello
wants to merge
41
commits into
ngParty:3.x
Choose a base branch
from
aciccarello:testing
base: 3.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…#156) To clarify the confusion of ngParty#139, change documentation to make it more clear that inputs are optional. Add information to the begining of the decorator descriptions above the existing note in the description of the decorator parameters to make the information more visible.
* Some testing documentation * Update README.md
…oth global and module type definitions (ngParty#167) - now it will work for both type defs for angular ( from typings or from npm @types/angular ) - ofc you can use just one not both types from typings and @types/angular - if you are using @types you have to introduce within your tests `import * as angular from 'angular'` to be able to do `angular.mock....`, angular is no longer exposed on global * fix(manual_typings): revert auto from namespace back to module
…js or other polyfill - update docs and tweak error message if Reflect.metadata isn't present
Peer deps fix
…t to every module which relies on it Closes ngParty#170
fix(manual_typings/globals): remove Type alias from globals and add i…
… so angular is loaded not from global namespace - remove bash script for appending manual typings to core.d.ts which doesn't work - remove typings - update packages ( ts, ts-node, mocha, chai )
…t them to source - bump to typescript@next which resolves issues with type declaration generation - extract angular module type overrides to separate file which should by included within consumer app - make global.d.ts truly global - use only ng.* namespace for types ( no angular ) - update tsconfig to make tsc faster, stronger ;) - fix compile errors introduced by latest ts 2.1 with better any type inference - fix NgModule decorator options types to properly allow registering downgraded ng2 entities Closes ngParty#175, ngParty#177 BREAKING CHANGE: We now officialy support only angular typings provided via npm `@types/*` and also typescript 2.x - your existing typings provided by `typings` might not work - from now on if you wanna use deprecated `provide` function from `ng-metadata/core` with registration within `angular.module().directive|service|filter` you have to explicitly include angular types extension provided by ng-metadata from `node_modules/ng-metadata/manual_typings/angular-extension.d.ts` Before: ```typescript // global.d.ts /// <reference path="../node_modules/ng-metadata/manual_typings/globals.d.ts" /> ``` After: ```typescript /// <reference path="../node_modules/ng-metadata/manual_typings/angular-extension.d.ts" /> ``` or you can include it from within your tsconfig.json like this: ```json { "include":[ "src/**/*.ts" ], "files": [ "node_modules/ng-metadata/manual_typings/angular-extension.d.ts" ], "exclude": [ "node_modules" ] } ```
Tweak build to ts 2.x
- add new super powers for hybrid ng1/ng2 - don't need to create new opaque tokens for downgrade ng2 services, just decorate the service with ngMetadata @Injectable and everything will work == even less refactoring during migrating to ng2 ! yay! - @input,@output are automatically determined for you so you don't have to specify them within downgradeComponent function - add convenient helper for upgrading ng1/ngMetadata services to ng2 via `upgradeInjectable` - allow easily upgradable ngMetadata @Injectable services to ng2 via `upgradeAdapter.upgradeNg1Provider` All new API's are available under `ng-metadata/upgrade` module namespace Closes ngParty#178
…pply instead of next tick - this properly allows to handle user events on input elements like in angular 2 Closes ngParty#171
aciccarello
changed the title
WIP Backport Testing Helpers
Backport Inject Testing Helper
Nov 24, 2016
small fixing of typos
Node 6 tries to name anonymous functions if assigned to a variable Windows adds a carriage return character to the end of line which shoud not be included by stringify
…^5.0.1. Also move to stable TS 2.1 (ngParty#189) Closes ngParty#185
* docs(api/upgrade): add docs about AOT upgrade function helpers * docs(api/recipes/upgrade): add docs how to upgrade with new upgrade/static function helpers * docs(README): point to new v4 plunker and update rxjs version Closes ngParty#176
… subscriptions Closes ngParty#187
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Started work on test helpers. Inject was straightforward but TestBed will be a larger undertaking.
Partial fix for #93