Skip to content

chore: add Node.js v24 to CI workflow #1377

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

danielpeintner
Copy link
Member

resolves #1373

@danielpeintner danielpeintner requested a review from relu91 as a code owner May 7, 2025 09:47
@danielpeintner
Copy link
Member Author

danielpeintner commented May 7, 2025

It seems node-mbus seems to cause issues

EDIT: opened Apollon77/node-mbus#134

@danielpeintner
Copy link
Member Author

We seem to run into a similar issue as mentioned in mochajs/mocha#5317

@danielpeintner
Copy link
Member Author

I think the issue has to do with @testdeck/mocha were we are using an old version. Anyhow, switching to the latest version 0.3.3 which is already 3 years old doesn't help either.

Once I start adding a test with "suite" I get the following message

SyntaxError: Named export 'suite' not found. The requested module '@testdeck/mocha' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@testdeck/mocha';
const { suite } = pkg;

or messages like

Exception during run: SyntaxError[ @d:\projects\WoT\thingweb\thingweb.node-wot-danielpeintner\packages\core\test\ClientTest.ts ]: Invalid or unexpected token
at compileSourceTextModule (node:internal/modules/esm/utils:351:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:107:18)
at ModuleLoader. (node:internal/modules/esm/translators:608:10)
at ModuleLoader.#translate (node:internal/modules/esm/loader:546:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:593:27)
at async ModuleJob.#link (node:internal/modules/esm/module_job:180:19)

Other test pass. Any proposal?

I am wondering whether we should remove @testdeck/mocha entirely
and switch to the assert test style

import { assert } from 'chai';

describe("Foo Tests", () => {
   it("should fooABC", () => {
      const result = ...;
      assert.equal(result, 5);
   });
});

@danielpeintner
Copy link
Member Author

The @testdeck/mocha dependency seems no longer providing updates (last update was Dec 2025).

We currently use it in some test in the following packages

  • binding-coap (3 test files)
  • binding-http (7 test files)
  • binding-websockets (1 test file)
  • cli (1 test file)
  • core (9 test files)

Shall we make the effort to update those tests, or what is the best way forward?

Any other opinions? Maybe there is an easier fix 🤷‍♂️

@danielpeintner
Copy link
Member Author

I created testdeck/testdeck#391

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.

Node.js 24 is coming
1 participant