Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

fix: removing mocha stack entries #41

Conversation

lucassus
Copy link
Contributor

@lucassus lucassus commented Aug 2, 2014

No description provided.

@lucassus
Copy link
Contributor Author

lucassus commented Aug 2, 2014

idea: it will be great to have an option for filtering other files from the stack trace, for example chai, protractor etc. something like:

module.exports = function(config) {
  config.set({
    client: {
      mocha: {
        ui: 'tdd',
        stackFilters: [
           '/node_modules/*',
           '/node_modules/protractor/*',
           /custom regular expression/
        ]
      }
    }
  });
};

simillar to mochajs/mocha#1170

@pkozlowski-opensource
Copy link
Member

@lucassus thnx for this PR, there is definitively a problem to be fixed here. I guess it was introduced when Karma switched from timestamps to hashes for content caching.

Your fix works well for modern browsers I've tested with (Chrome, FFox, Safari). Did you have a chance to test it in IE (any version)?

All in all it looks good, it will just need a tiny bit of work on tests.

@pkozlowski-opensource
Copy link
Member

Funny thing, the same was already fixed in Jasmine adapter via karma-runner/karma-jasmine@802d503

@lucassus
Copy link
Contributor Author

the same was already fixed in Jasmine adapter

interesting. Also I noticed that they use less strict regexp for timestamps \w*. I decided to use the same pattern in my pull-request.

@lucassus
Copy link
Contributor Author

@pkozlowski-opensource I think it's ready to merge. What do you think about my comment lucassus@d9e5313#commitcomment-7416502 ?

@pkozlowski-opensource
Copy link
Member

@lucassus thnx, finally I've decided to merge this one as-is, we are going to probably simplify this test while working on other issues in this area.

Regarding your idea expressed here: #41 (comment) - please open a separate issue / PR for this if needed.

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.

2 participants