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

Tests are failing in Windows #157

Open
roguib opened this issue Oct 28, 2020 · 3 comments · May be fixed by #165
Open

Tests are failing in Windows #157

roguib opened this issue Oct 28, 2020 · 3 comments · May be fixed by #165
Labels
bug Something isn't working

Comments

@roguib
Copy link

roguib commented Oct 28, 2020

I was playing around with the project, trying to find an optimal solution for #142 since I'm on Windows, but after making some changes to the codebase I decided to run the test suites with yarn test and some of them were failing. I thought that maybe was a consequence of my changes, so I tried again without any changes and tests were still failing. The results were the following:

Test Suites: 7 failed, 4 passed, 11 total
Tests:       46 failed, 52 passed, 98 total
Snapshots:   10 failed, 118 obsolete, 118 written, 20 passed, 148 total
Time:        69.965s
Ran all test suites

I'm missing some command? Let me know if you need more information 😄

@AnatoleLucet AnatoleLucet added the bug Something isn't working label Oct 29, 2020
@roguib
Copy link
Author

roguib commented Oct 29, 2020

Just a quick update. After installing node and yarn in WLS2 I was able to pass all the tests. The results were the following:

Test Suites: 11 passed, 11 total                                                                                        
Tests:       98 passed, 98 total                                                                                        
Snapshots:   148 passed, 148 total                                                                                      
Time:        167.841s                                                                                                   
Ran all test suites.

I'm not sure why tests are failing in Windows PowerShell or, at least, in my PowerShell. I'd like to use the debugger to be able to inspect the code but, for some reason, it fails after being attached with the following message.

Debugger attached.
Waiting for the debugger to disconnect...
C:\Users\roger\Documents\Proyectos\destiny-fork\node_modules\.bin\jest:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at wrapSafe (internal/modules/cjs/loader.js:992:16)
    at Module._compile (internal/modules/cjs/loader.js:1040:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

I've tried to change the base directory to destiny_fork, thinking that maybe the slash was causing some problems, but the error wasn't fixed.

@Ryan-Florida
Copy link
Contributor

Ryan-Florida commented Dec 14, 2020

@roguib looking at your error message, it seems that you are closing your double-quotes early.
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
--------------------^ ------ ^
Those two are your open and closing delimiters, hence the missing ) after argument list SyntaxError.

@roguib
Copy link
Author

roguib commented Dec 15, 2020

Yeah but I think it's something related to Jest running in Windows since the error comes from that package. I couldn't have the time to play around but maybe upgrading Jest version would be enough for fixing it.

@roguib roguib linked a pull request Feb 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants