Skip to content

Commit

Permalink
stay commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sickbart committed Jan 22, 2025
1 parent ff05516 commit 70312f6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 37 deletions.
2 changes: 1 addition & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = [...compat.extends('eslint:recommended'), {
},

ecmaVersion: 2020,
sourceType: 'module',
sourceType: 'commonjs',
},

rules: {
Expand Down
39 changes: 9 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^5.0.0",
"@types/chai": "^4.2.22",
"@types/chai-as-promised": "^8.0.1",
"@types/chai-as-promised": "^7.1.8",
"@types/gulp": "^4.0.17",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.7",
Expand All @@ -44,7 +44,7 @@
"@types/sinon-chai": "^3.2.12",
"axios": "^1.7.9",
"chai": "^4.5.0",
"chai-as-promised": "^8.0.1",
"chai-as-promised": "^7.1.2",
"eslint": "^9.18.0",
"eslint-plugin-html": "^8.1.2",
"mocha": "^11.1.0",
Expand Down
6 changes: 3 additions & 3 deletions test/mocha.setup.mjs → test/mocha.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ process.on('unhandledRejection', (e) => {

// enable the should interface with sinon
// and load chai-as-promised and sinon-chai by default
import sinonChai from 'sinon-chai';
import chaiAsPromised from 'chai-as-promised';
import {should, use} from 'chai';
const sinonChai = require('sinon-chai');
const chaiAsPromised = require('chai-as-promised');
const {should, use} = require('chai');

should();
use(sinonChai);
Expand Down
2 changes: 1 addition & 1 deletion test/mocharc.custom.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": [
"test/mocha.setup.mjs"
"test/mocha.setup.js"
],
"watch-files": [
"!(node_modules|test)/**/*.test.js",
Expand Down

0 comments on commit 70312f6

Please sign in to comment.