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

fix tests on windows #318

Merged
merged 1 commit into from
May 22, 2018
Merged

fix tests on windows #318

merged 1 commit into from
May 22, 2018

Conversation

TimeForANinja
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented May 6, 2018

Codecov Report

Merging #318 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #318   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         594    594           
  Branches      148    148           
=====================================
  Hits          594    594

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56f9cc2...ee60c5e. Read the comment docs.

@TimeForANinja
Copy link
Collaborator Author

TimeForANinja commented May 9, 2018

should maybe also describe it a bit
running it produces an error on windows:

basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list

the solution can be found here:
gotwarlost/istanbul#677

@fent
Copy link
Owner

fent commented May 9, 2018

Do you know if changing from node_modules/mocha/bin/_mocha to just mocha would also work?

@fent fent added the bug label May 13, 2018
@TimeForANinja
Copy link
Collaborator Author

does not look like that works

C:\Users\\Documents\GitHub\node-ytdl-core>npm test

> ytdl-core@0.20.3 test C:\Users\\Documents\GitHub\node-ytdl-core
> istanbul cover mocha -- -t 16000 test/*-test.js

No coverage information was collected, exit without writing coverage information
C:\Users\\Documents\GitHub\node-ytdl-core\node_modules\.bin\mocha.CMD:1
(function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0\node.exe" (
                                                              ^

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:152:10)
    at Module._compile (module.js:605:28)
    at Object.Module._extensions..js (module.js:652:10)
    at Object.Module._extensions.(anonymous function) [as .js] (C:\Users\\Documents\GitHub\node-ytdl-core\node_modules\istanbul\lib\hook.js:109:37)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Function.Module.runMain (module.js:682:10)
    at runFn (C:\Users\\Documents\GitHub\node-ytdl-core\node_modules\istanbul\lib\command\common\run-with-cover.js:122:16)
npm ERR! Test failed.  See above for more details.```

@fent fent self-requested a review May 22, 2018 02:00
@fent fent merged commit b6c60b5 into fent:master May 22, 2018
@fent
Copy link
Owner

fent commented May 22, 2018

Thanks!

Looks like I'll have to update other repos that use a similar path too.

@TimeForANinja
Copy link
Collaborator Author

Np
Interesting how uncommon windows seems to be

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

Successfully merging this pull request may close these issues.

2 participants