Skip to content

Commit

Permalink
8
Browse files Browse the repository at this point in the history
  • Loading branch information
HGlab01 committed Aug 13, 2024
1 parent ae4b6c7 commit 6dc9114
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { expect } from 'chai';
// import { functionToTest } from "./moduleToTest";

describe('module to test => function to test', () => {
// initializing logic
const expected = 5;
// initializing logic
const expected = 5;

it(`should return ${expected}`, () => {
const result = 5;
// assign result a value from functionToTest
expect(result).to.equal(expected);
// or using the should() syntax
result.should.equal(expected);
});
// ... more tests => it
it(`should return ${expected}`, () => {
const result = 5;
// assign result a value from functionToTest
expect(result).to.equal(expected);
// or using the should() syntax
result.should.equal(expected);
});
// ... more tests => it

});

Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class Tinymqttbroker extends utils.Adapter {
// Status is 'open' if currently in use or 'closed' if available
if (status == 'open') {
this.log.error(`Port ${serverPort} in use, please configure another port in adapter settings!`);
//this.terminate ? this.terminate(utils.EXIT_CODES.INVALID_CONFIG_OBJECT) : process.exit(0);
this.terminate ? this.terminate(utils.EXIT_CODES.INVALID_CONFIG_OBJECT) : process.exit(0);

Check failure on line 46 in src/main.ts

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected an assignment or function call and instead saw an expression
return;
}
else {
this.aedes = new Aedes();
Expand Down

0 comments on commit 6dc9114

Please sign in to comment.