•  
      request #13653 Import manually all spec files
    Infos
    #13653
    Joris MASSON (jmasson)
    2019-07-30 14:03
    2019-07-22 16:36
    14037
    Details
    Import manually all spec files
    We should not rely on **/*.spec.js globs in karma config. It is bad.
    Why is it bad ?
    Because depending on your environment, the order of tests might change. Running tests randomly is a good thing when you know it's going to be random. Here, we don't really know it and so one day tests will break and we'll spend an afternoon wondering why the ordering of the tests changed and why it broke our tests.
    Having an "app.spec.js" file importing every other spec file sure is annoying to maintain, but at least it lets us control the order of the tests. It also lets us apply "global" mocks once for all tests, for example mocking TLP.
    Finally, it means webpack compiles only one bundle of files for tests.
    internal improvement
    Dev tools
    All
    Empty
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2019-07-30
    Attachments
    Empty
    References

    List of items referenced by or referencing this item.

    Artifact Tracker v5

    Follow-ups