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

Use built binary when executing spectron tests #247

Open
pyphilia opened this issue Mar 27, 2020 · 1 comment
Open

Use built binary when executing spectron tests #247

pyphilia opened this issue Mar 27, 2020 · 1 comment
Assignees
Labels
test Testing and coverage

Comments

@pyphilia
Copy link
Contributor

No description provided.

@pyphilia pyphilia added the test Testing and coverage label Mar 27, 2020
@pyphilia pyphilia self-assigned this Mar 27, 2020
@pyphilia pyphilia mentioned this issue Mar 27, 2020
@pyphilia pyphilia changed the title Use built binary when executing mocha tests Use built binary when executing spectron tests Apr 23, 2020
@pyphilia
Copy link
Contributor Author

I investigated this issue, and editing electronPath is not working for me (Windows with an unpacked build .exe). The built version of graasp-desktop opens but is completely blank. It is not the case when I open the .exe as a normal executable file.

It might work for other OS. The process would be:

  • change path: electronPath in the test/application.js file with the executable file (produced with yarn dist)
  • change the mocha script in package.json to just
    "mocha": "mkdirp test/tmp && mocha --require @babel/register \"test/**/*.test.js\""
    Here I believe that, if we are using an executable file, the local server should not be necessary.
    You might want to specify a file to just run a single test (and not 50 long tests). test/menu.test.js for instance contains a single test.
  • run yarn mocha

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

No branches or pull requests

1 participant