Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const path = require('path');
const {tests} = require('@iobroker/testing');
// Run tests
tests.integration(path.join(__dirname, '..'), {
defineAdditionalTests(getHarness) {
describe('Test sendTo()', () => {
it('Should work', () => {
return new Promise(resolve => {
// Create a fresh harness instance each test!
const harness = getHarness();
// Start the adapter and wait until it has started
harness.startAdapterAndWait().then(() => {
harness.sendTo('hm-rega.0', 'test', 'message', (resp) => {
console.dir(resp);
resolve();
});
'use strict';
const path = require('path');
const {tests} = require('@iobroker/testing');
// Run tests
tests.integration(path.join(__dirname, '..'), {
defineAdditionalTests(getHarness) {
describe('Test sendTo()', () => {
it('Should work', () => {
return new Promise(resolve => {
// Create a fresh harness instance each test!
const harness = getHarness();
// Start the adapter and wait until it has started
harness.startAdapterAndWait().then(() => {
harness.sendTo('hm-rpc.0', 'test', 'message', (resp) => {
console.dir(resp);
resolve();
});
});
});
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, '..'), { "allowedExitCodes": [11] });
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, '..'), { "allowedExitCodes": [11] });