about

Karma file load order and mocked HTTP server - 22 Mar 2015

search

It took me far too long to figure out Ordering with Karma.

  • The order of patterns determines the order in which files are included in the browser.
  • Multiple files matching a single pattern are sorted alphabetically.
  • Each file is included exactly once. If multiple patterns match the same file, it’s included as if it only matched the first pattern.

Notice the files block in the following Gist, this is the output of transpilation from our typescript business logic that is then used in testing.

GitHub Gist.


In this particular repo, everything is written in typescript, including Jasmine spec files:

GitHub Gist.


The whole build process is managed using - https://github.com/Workiva/wGulp - see the following:

GitHub Gist.


138 words. Post tags: Karma, testing, node, and JavaScript.

Post content is written by Jason Zerbe and licensed CC BY-NC 3.0.