Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[regression] instrumentedFiles -> temp folder not created properly resulting in error every other run #62

Open
tyge68 opened this issue Jan 3, 2017 · 2 comments

Comments

@tyge68
Copy link

tyge68 commented Jan 3, 2017

I have a odd issue since using version 1.0.0 of this plugin.

Now each time I execute the qunit task configured as follow:

   qunit: {
        options: {
          '--web-security': 'no',
          coverage: {
            disposeCollector: true,
            src: ['src/**/*.js'],
            instrumentedFiles: 'temp/',
            jsonSummaryReport: 'report/json',
            htmlReport: 'report/coverage',
            lcovReport: 'report/',
            excludes: ['libs/*'],
            linesThresholdPct: 80
          }
        },
        all: ['testing/index.html']
    }

It fails every other run, from the investigation , it never fail if I make sure that the instrumentedFiles ("temp/") folder is created before executing. Which explain why it fails every other run then, as when it fails, the "temp/" folder is not removed, so the next run passes.

@tyge68 tyge68 changed the title instrumentedFiles -> temp folder not created properly resulting in error every other run [regression] instrumentedFiles -> temp folder not created properly resulting in error every other run Jan 3, 2017
@agistrilink
Copy link

A workaround can be to alter the code in the tasks/qunit.js:241 by wrapping the
options.coverage.instrumentedFiles to fs.realpathSync(options.coverage.instrumentedFiles).

The other, preferable workaround (no code change!) is to specify an absolute and portable path, e.g. /tmp.

@fabschen
Copy link

@agistrilink I link the workaround here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants