Skip to content

Commit

Permalink
Fixed testing
Browse files Browse the repository at this point in the history
  • Loading branch information
braindead1 committed Apr 20, 2020
1 parent 97ae25e commit 66be900
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 13 deletions.
File renamed without changes.
30 changes: 30 additions & 0 deletions main.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use strict';

/**
* This is a dummy TypeScript test file using chai and mocha
*
* It's automatically excluded from npm and its build output is excluded from both git and npm.
* It is advised to test all your modules with accompanying *.test.js-files
*/

// tslint:disable:no-unused-expression

const { expect } = require('chai');
// import { functionToTest } from "./moduleToTest";

describe('module to test => function to test', () => {
// 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

});

// ... more test suites => describe
43 changes: 31 additions & 12 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"email": "hufnagl@hotmail.com"
}
],
"main": "robonect.js",
"main": "main.js",
"repository": {
"type": "git",
"url": "git+https://github.com/braindead1/ioBroker.robonect.git"
Expand Down

0 comments on commit 66be900

Please sign in to comment.