Skip to content

Make test injector and test component builder (more) agnostic to the test environment #2783

Closed

Description

@juliemr

The test_lib contains many helpers, but it's closely coupled with the Jasmine-style BDD environment. Decouple where possible - in particular, to enable running with the dart:test package, and to enable running in JavaScript outside of Angular's own repository.

Activity

  1. self-assigned this
    on Jun 30, 2015
  2. juliemr commented on Jul 1, 2015

    @juliemr
    ContributorAuthor

    In regards to dart:test:

    Most of the things that the test lib does are not generalizable. They are simple functions that wrap around testing functions (like beforeEach and it). I think there is actually nothing that would be helpful to pull out - we should just have a separate adapter for dart:test.

    There are also several matchers and spy functions, which may be nice to have but should be doable with basic dart:test and a mock library (dart recommends mockito).

  3. added this to the alpha-31 milestone on Jul 1, 2015
  4. added
    area: testingIssues related to Angular testing features, such as TestBed
    on Jul 1, 2015
  5. added
    featureLabel used to distinguish feature request from other issues
    on Jul 2, 2015
  6. kevmoo commented on Jul 6, 2015

    @kevmoo
    Contributor

    Agreeing with @juliemr. It'd be really nice if guinness was split into helpers vs the imperative functions.

  7. naomiblack commented on Jul 6, 2015

    @naomiblack
    Contributor

    @juliemr can you figure out handoff if this one isn't landing before your OOO?

  8. zzo commented on Jul 7, 2015

    @zzo
    Contributor

    is there documentation for how to use test_bed/TestComponentBuilder somewhere? Personally am only interested in the JS side of things thanks! :)

  9. juliemr commented on Jul 11, 2015

    @juliemr
    ContributorAuthor

    Update: I am stuck on some injector issues while decoupling - bumping to next milestone.

  10. modified the milestones: alpha-32, alpha-31 on Jul 11, 2015
  11. juliemr commented on Jul 17, 2015

    @juliemr
    ContributorAuthor

    Here is a working example of a unit test written using dart:test, using the test injector and TestComponentBuilder: https://github.com/juliemr/angular/tree/test-lib-package-2/darttest

    Next up I'll be adding useful helpers from test_lib.

  12. 16 remaining items

  13. juliemr commented on Feb 25, 2016

    @juliemr
    ContributorAuthor

    This is largely done - most of the actual control is in the testInjector now. See #7266 for one remaining idea.

  14. angular-automatic-lock-bot commented on Sep 8, 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 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: testingIssues related to Angular testing features, such as TestBedeffort2: daysfeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions