Skip to content

fix: broken grunt test#374

Open
Shashwat325 wants to merge 1 commit intoaces:masterfrom
Shashwat325:fix/qunit-npm-dependency
Open

fix: broken grunt test#374
Shashwat325 wants to merge 1 commit intoaces:masterfrom
Shashwat325:fix/qunit-npm-dependency

Conversation

@Shashwat325
Copy link
Copy Markdown

grunt test was broken on modern Node.js with the following error:
Fatal error: The "cb" argument must be of type function. Received undefined

The dependencies on which the grunt test depends were outdated which led to this error. I fixed that by updating those dependencies via npm:
Upgraded grunt-contrib-qunit to latest version which now uses headless Chrome instead of abandoned phantomjs.

Added qunit as a devDependency in package.json.

Updated test HTML files to reference QUnit from node_modules so now the test will always use the npm managed version.

Added grunt-contrib-connect to serve files over HTTP for headless Chrome (required as Chrome cannot load files directly from filesystem like phantomjs).

Updated Gruntfile.js to use puppeteer with no-sandbox flags for headless Chrome compatibility

Fixed a pre-existing jshint scope error in examples/bigbrain-viewer-demo.js that was blocking grunt test from completing

Before
Screenshot 2026-03-19 114916

After
qunit proper update

Remove package-lock.json from tracking

Add package-lock.json to gitignore
@Shashwat325
Copy link
Copy Markdown
Author

@natacha-beck, any thoughts on this approach ?
I followed your suggestion from #370

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.

1 participant