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

Chore: Add electron test #77

Merged
merged 4 commits into from
Dec 7, 2022
Merged

Chore: Add electron test #77

merged 4 commits into from
Dec 7, 2022

Conversation

nytamin
Copy link
Owner

@nytamin nytamin commented Dec 7, 2022

This PR adds a test for ensuring that threadedclass works inside of packed electron apps.

The test is based on Hannes Rügers repo https://github.com/hrueger/threadedclass-issue-74, thanks!

@nytamin
Copy link
Owner Author

nytamin commented Dec 7, 2022

Running the test with the latest threadedclass version (1.2.0) renders the result:

./electron-tests>node run-tests.js
=========================================
Running test with threadedClass version "1.2.0" and electron version "15"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Signal "exit" event, exit code: 0
=========================================
Running test with threadedClass version "1.2.0" and electron version "17"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Timeout after 2000, context: "set up threadedclass"
   stderr: Signal "exit" event, exit code: 1
=========================================
Running test with threadedClass version "1.2.0" and electron version "20"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Timeout after 2000, context: "set up threadedclass"
   stderr: Signal "exit" event, exit code: 1
=========================================
Running test with threadedClass version "1.2.0" and electron version "22"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Timeout after 2000, context: "set up threadedclass"
   stderr: Signal "exit" event, exit code: 1
Done successfully!

...highlighting the issues with electron 17, 20 & 22.

Running the test with the version of threadedclass with the fix in PR #75 renders this result:

./electron-tests>node run-tests.js 1.2.1-nightly--20221205-135702-1e063a1.0
=========================================
Running test with threadedClass version "1.2.1-nightly--20221205-135702-1e063a1.0" and electron version "15"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Signal "exit" event, exit code: 0
=========================================
Running test with threadedClass version "1.2.1-nightly--20221205-135702-1e063a1.0" and electron version "17"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Signal "exit" event, exit code: 0
=========================================
Running test with threadedClass version "1.2.1-nightly--20221205-135702-1e063a1.0" and electron version "20"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Signal "exit" event, exit code: 0
=========================================
Running test with threadedClass version "1.2.1-nightly--20221205-135702-1e063a1.0" and electron version "22"
Starting tests...
yarn install
yarn test:vanilla
   stderr: Signal "exit" event, exit code: 0
yarn test:electron
   stderr: Signal "exit" event, exit code: 0
yarn electron-compile
yarn test:electron-compiled
   stderr: Signal "exit" event, exit code: 0
Done successfully!

@nytamin nytamin merged commit edb1c6d into master Dec 7, 2022
@nytamin nytamin deleted the chore/electron-test branch December 7, 2022 14:39
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

Successfully merging this pull request may close these issues.

None yet

2 participants