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

test(bindings/js): unfix segfault #517

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion bindings/js/minify.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func minifyFile(cmediatype, cinput, coutput *C.char) *C.char {

//export minifyCleanup
func minifyCleanup() {
os.Exit(0)
// This will fix the worker thread segfault test by explicitly ending the node
// process with a 0 signal
// os.Exit(0)
}

func main() {}
1 change: 1 addition & 0 deletions bindings/js/test/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if (isMainThread) {
throw "unexpected output using worker threads: '"+output+"' instead of '"+expected+"'";
}
await worker.terminate();
console.log("success!"); // this needs to be printed
} else {
const { config, string } = await import('@tdewolff/minify');
config({'html-keep-document-tags': true})
Expand Down