Skip to content

Test development cycle is slow unless sourcemaps are turned off #5423

Closed
@wardbell

Description

@wardbell

The iterating unit test development is painfully slow (and appears to grow slower during a session) when running ng test.

The console shows re-build 92% complete and then hangs for up to a minute (it seems anyway) before finally reporting test progress and refreshing the karma browser.

The test progress reporter ticks along at a slow pace.

However, ng test --sourcemap=false (turning off sourcemaps) results in crisp iterations, with rebuild times in the sub-second range.

I'm describing my experience on a small app (the new Angular DocViewer) with fewer than 100 tests so far.

Bug Report or Feature Request (mark with an x)

  • bug report -> please search issues before submitting
  • feature request

Versions.

4.0.0-rc.2,
OS/X, node 6.9.5, npm 4.1.2

Repro steps.

  1. Open a CLI project with tests.
  2. Develop tests in a single spec file with ng test, changing frequently.
  3. Do the same again with ng test --sourcemap=false (soon to be --sourcemaps=false

Compare your experience.

Observations

I believe that in the typical dev/test cycle, the programmer changes a single test file 80% of the time, the corresponding application file 10% of the time, and hardly anything else the remaining 10%.

My sense is that it would be wise to optimize for this workflow.

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