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

Add test for worker thread support #17

Merged
merged 2 commits into from
Jul 7, 2020
Merged

Add test for worker thread support #17

merged 2 commits into from
Jul 7, 2020

Conversation

Widdershin
Copy link
Collaborator

Just a simple test, loading the module, capturing a small profile and
sending it back over the wire.

The test will be skipped if the worker_threads module can't be required.

@Widdershin Widdershin force-pushed the worker-threads-test branch from 95c9a4e to 15ec637 Compare July 7, 2020 03:37
Copy link
Owner

@hyj1991 hyj1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

profiler = require('../');

const NODE_V_010 = /^v0\.10\.\d+$/.test(process.version);
const SOURCE_PATH = path.join(__dirname, '..');

var workerThreads;
Copy link
Owner

@hyj1991 hyj1991 Jul 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here could be let, but I think we could open another pr to fix it because of many other var in the raw file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaks Node 4 and 5 on Travis

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually might just need a "use strict" in this file.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually might just need a "use strict" in this file.

enen

@Widdershin Widdershin force-pushed the worker-threads-test branch from 15ec637 to 9025e2b Compare July 7, 2020 04:04
Just a simple test, loading the module, capturing a small profile and
sending it back over the wire.

The test will be skipped if the worker_threads module can't be required.
@Widdershin Widdershin force-pushed the worker-threads-test branch from 9025e2b to cbecd20 Compare July 7, 2020 04:16
@hyj1991 hyj1991 merged commit d1f3252 into master Jul 7, 2020
@Widdershin Widdershin deleted the worker-threads-test branch July 7, 2020 10:05
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.

2 participants