Skip to content

Commit

Permalink
add std tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm1957 committed Sep 14, 2023
1 parent 9e52e22 commit 4538c33
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/integration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const path = require('path');
const { tests } = require('@iobroker/testing');

// Run integration tests - See https://github.com/ioBroker/testing for a detailed explanation and further options
tests.integration(path.join(__dirname, '..'));
14 changes: 14 additions & 0 deletions test/mocha.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Don't silently swallow unhandled rejections
process.on('unhandledRejection', (e) => {
throw e;
});

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

should();
use(sinonChai);
use(chaiAsPromised);
4 changes: 4 additions & 0 deletions test/mocharc.custom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"require": ["test/mocha.setup.js"],
"watch-files": ["!(node_modules|test)/**/*.test.js", "*.test.js", "test/**/test!(PackageFiles|Startup).js"]
}
5 changes: 5 additions & 0 deletions test/package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const path = require('path');
const { tests } = require('@iobroker/testing');

// Validate the package files
tests.packageFiles(path.join(__dirname, '..'));
7 changes: 7 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"noImplicitAny": false
},
"include": ["./**/*.js"]
}

0 comments on commit 4538c33

Please sign in to comment.