Skip to content

Missing DI providers with beta 2 #6813

Closed

Description

@andrashatvani

We use TestComponentBuilder in our tests and after the upgrade to beta 2 the following providers won't be provided anymore automatically by angular:

  • TestComponentBuilder
  • DirectiveResolver
  • ViewResolver
  • DOCUMENT_TOKEN.
    The problem is that DOCUMENT_TOKEN isn't in the codebase anymore; it used to reside in 'angular2/src/render/dom/dom_renderer'.

Furthermore, the Jasmine libraries won't be exported automatically anymore, either.

Activity

  1. zoechi commented on Feb 1, 2016

    @zoechi
    Contributor

    You are using the TEST_BROWSER_XXX_PROVIDERS like explained in b0cebdb ?
    See also https://github.com/angular/angular/blob/master/CHANGELOG.md#features

  2. andrashatvani commented on Feb 1, 2016

    @andrashatvani
    Author

    No, I missed the change. But after adding the required setup I see the following error reported by Karma:
    Error: XHR error (404 Not Found) loading http://localhost:9876/angular2/platform/testing/browser

  3. ericmdantas commented on Feb 1, 2016

    @ericmdantas
    Contributor

    Same problem here with TestComponentBuilder and jasmine's typings.

  4. brandonroberts commented on Feb 1, 2016

    @brandonroberts
    Contributor

    The TEST_BROWSER_XXX_PROVIDERS didn't make it into the bundles: See #5351 (comment)

  5. andrashatvani commented on Feb 1, 2016

    @andrashatvani
    Author

    @brandonroberts What is the impact of the referenced issue on this one?

  6. brandonroberts commented on Feb 1, 2016

    @brandonroberts
    Contributor

    @andrashatvani You can't import TEST_BROWSER_XXX_PROVIDERS from angular2/platform/testing/browser which is why you were getting the 404.

  7. andrashatvani commented on Feb 1, 2016

    @andrashatvani
    Author

    @brandonroberts But these providers are there in angular2/platform/testing/browser

  8. brandonroberts commented on Feb 1, 2016

    @brandonroberts
    Contributor

    Ok, they must have updated the built bundles for beta.2.

  9. brandonroberts commented on Feb 1, 2016

    @brandonroberts
    Contributor

    @andrashatvani DOCUMENT_TOKEN is provided as DOCUMENT now from angular2/platform/browser

    https://angular.io/docs/ts/latest/api/platform/browser/DOCUMENT-let.html

  10. thorstenhans commented on Feb 1, 2016

    @thorstenhans

    Both TEST_BROWSER_PLATFORM_PROVIDERS and TEST_BROWSER_APPLICATION_PROVIDERS are there in the source but they didn't make it into the bundles. Is there a way how to fix this - at least locally?

    According to the ChangeLog they should be there https://github.com/angular/angular/blob/master/CHANGELOG.md#features

  11. alexeagle commented on Feb 1, 2016

    @alexeagle
    Contributor

    I updated the bundles on code.angularjs.org.
    Fix for the npm release will come this week in beta.3 (should be Wednesday)

  12. meriturva commented on Feb 2, 2016

    @meriturva

    Great we really need it fixed here as soon as possible! So thanks!

  13. andrashatvani commented on Feb 4, 2016

    @andrashatvani
    Author

    Verified fixed.

  14. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  15. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions