question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mocha v3.1.0 finding global leak

See original GitHub issue

Attn: @mde @TimothyGu

This morning I merged https://github.com/mde/ejs/pull/203. The build PR build was passing. This should not have affected anything. Changeset: https://github.com/mde/ejs/compare/5355a2cf4fbe...6c2663e347dd.

I received an email notifying me that the Travis Build had failed on master https://travis-ci.org/mde/ejs/builds/163080741. The log says:

87 passing (185ms)

  1 failing

  1) -%> stack traces work:

     Error: global leak detected: data

I cannot reproduce locally. I tried restarting the build just in case, it did not make a difference. The previous build worked fine: https://travis-ci.org/mde/ejs/builds/161735725.

I created a new branch test off of master and ran git reset --hard HEAD~ and pushed it to origin to see if that Travis build will pass. It doesn’t: https://travis-ci.org/mde/ejs/builds/163120705. This is the exact same commit as the passing https://travis-ci.org/mde/ejs/builds/161735725!

This seems to be a Travis bug. Advice?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RyanZimcommented, Sep 29, 2016

OK, I will make a PR editing the ejs file.

1reaction
mdecommented, Sep 29, 2016

No, EJS can’t throw an error on globals. Globals are a bad practice, but they are valid JavaScript.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js - why do I get leaks when testing with mocha and ...
Mocha should give some hints on where the leaks are, such as forgetting to declare local variable with var. // global leaks a...
Read more >
Global leaks in mocha when running with coverage · Issue #289
When I execute tests with mocha + code coverage, mocha throws a couple global leak errors due to the code instrumentation by instanbul....
Read more >
Mocha - the fun, simple, flexible JavaScript test framework
Use this option to have Mocha check for global variables that are leaked while running tests. Specify globals that are acceptable via the...
Read more >
mocha-ctx - npm
Contextualized 'global' || 'window', with stronger access and use detection on top of leak detection. Status. This is a prototype / experimental ...
Read more >
api documentation for mocha (v3.3.0)
Closes #287 * Added: export top-level suite on global mocha object ... n = (i * (1.0 / 6)); var r = Math.floor(3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found