Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8877699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:31:42+00:00 2026-06-14T19:31:42+00:00

In my JS Test Driver configuration file, I’m excluding unit tests from code coverage

  • 0

In my JS Test Driver configuration file, I’m excluding unit tests from code coverage calculation by putting them under test instead of load.

However, I can’t do this for dependencies, like jQuery of Underscore.js, since they need to be loaded before my code.

Is there any way around this? Or do I just deal with the slow code coverage runs and statistic clutter?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:31:43+00:00Added an answer on June 14, 2026 at 7:31 pm

    Solution 1:

    There’s a way using the ´args´ parameter as Greg says, but that way unfortunately you have to specify the full path, as this (asuming Windows):

    plugin:
    - name: "coverage"
      jar: "lib/coverage-1.3.2.jar"
      module: "com.google.jstestdriver.coverage.CoverageModule"
      #Here put the files that have to be ignored by coverage. Non-existent files do not harm.
      args: "
        D:\\apache\\htdocs\\XTIME\\js\\lib\\ext-all.js,
        D:\\apache\\htdocs\\XTIME\\js\\lib\\jquery-1.7.2.min.js,     
      "
    

    For linux filesystems, you don’t have to use double slash.

    Solution 2:

    There’s also a patched jar for 1.3.5 on this thread that allows you to exclude files that match a regular expression, so you’d have:

    plugin:
    - name: "coverage"
      jar: "lib/coverage-1.3.5.serve-patch.jar"  #this patched jar allows to use excludesRegex
      module: "com.google.jstestdriver.coverage.CoverageModule"
      args: "excludesRegex: /js/lib/.*\\.js$"
    

    The /js/lib/.*\.js$ regex means “Exclude all the .js files located inside js/lib“. (With this patch you don’t have to worry about Windows backslashes)

    I prefer this way much more, as it’s portable because it does not depend on a specific path for your application.

    You can download the patched version here (look for Comment 11 in the thread).

    Hope this helps.
    Cheers, from La Paz-Bolivia

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using js-test-driver to run some tests and would like to test some code
For Javascript some testing-frameworks exist, like JSUnit or js-test-driver. They are fine, but they
Does anyone know ways of partially or fully automating driver test installation? I am
I have a selenium test that looks like require 'spec_helper' driver = Selenium::WebDriver.for :firefox
I am writing a test script using Selenium web driver (IE). I had no
I'm using the Node.js native driver. The following works fine db.collection(test).insert({hello:'world_safe'}, {safe: true}, function(err,
Is it a good idea to start new test framework using Selenium web driver
I often hear around here from test driven development people that having a function
This is my log4j configuration file, whenever I run the batch file to execute
I am facing one problem in Hibernate. Here is the code. Configuration cfg =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.