Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Conversation

@chrisirhc
Copy link
Contributor

Tests were compiling the element multiple times unnecessarily as it's done in the root describe's beforeEach.

Introduce describe blocks with no name to encapsulate tests that need the element to be compiled and separate them from tests that have their own compilation.

Using the reportSlowerThan option of karma, I found that the datepicker tests are running the slowest. This is also an indication that we might have a lot of watchers in datepicker. It's a rather complicated widget.

No changes in the testing at all. Only indentation and moving things around.

Before:
screen shot 2013-12-30 at 8 18 31 pm

After:
screen shot 2013-12-30 at 8 18 05 pm

Tests were compiling the element multiple times unnecessarily as it's
done in the root describe's beforeEach.

Introduce describe blocks with no name to encapsulate tests that need
the element to be compiled and separate them from tests that have their
own compilation.
@Foxandxss
Copy link
Contributor

That is an useful option in karma (I don't use karma myself). And making tests faster is always good. If we have a lot of watches, that is something to lookup next :)

@chrisirhc chrisirhc closed this in 5f8e3e8 Dec 31, 2013
@pkozlowski-opensource
Copy link
Member

Simply awesome! It cuts down the Karma run time from ~12s to ~8s on my MBP. Thnx so much @chrisirhc !

@chrisirhc chrisirhc deleted the feature/datepicker-spec-speedup branch January 3, 2014 08:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants