Skip to content

Commit

Permalink
Cleanup code (#33)
Browse files Browse the repository at this point in the history
* Cleanup code

* Cleanup code
  • Loading branch information
ottoszika authored Dec 9, 2019
1 parent 256e994 commit 5dc6e04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/devices/devices.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var eWeLinkConnect = require('../utils/ewelink-connect');
const eWeLinkConnect = require('../utils/ewelink-connect');

/**
* Devices node.
Expand Down
22 changes: 11 additions & 11 deletions test/credentials_spec.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
var helper = require('node-red-node-test-helper');
var credentialsNode = require('../src/credentials/credentials');
const helper = require('node-red-node-test-helper');
const credentialsNode = require('../src/credentials/credentials');

describe('Credentials Node', function () {
describe('Credentials Node', () => {

var credentials = {
const credentials = {
n1: {
email: 'dummy@dummy.tld',
password: 'abcd',
region: 'eu'
}
};

beforeEach(function (done) {
beforeEach(done => {
helper.startServer(done);
});

afterEach(function (done) {
helper.unload().then(function () {
afterEach(done => {
helper.unload().then(() => {
helper.stopServer(done);
});
});

it('should be loaded', function (done) {
it('should be loaded', done => {
var flow = [{ id: 'n1', type: 'ewelink-credentials' }];
helper.load(credentialsNode, flow, credentials, function () {
helper.load(credentialsNode, flow, credentials, () => {
var n1 = helper.getNode('n1');

n1.credentials.should.have.property('email', 'dummy@dummy.tld');
Expand All @@ -34,9 +34,9 @@ describe('Credentials Node', function () {
});
});

it('should unpack credentials', function (done) {
it('should unpack credentials', done => {
var flow = [{ id: 'n1', type: 'ewelink-credentials' }];
helper.load(credentialsNode, flow, credentials, function () {
helper.load(credentialsNode, flow, credentials, () => {
var n1 = helper.getNode('n1');

n1.should.have.property('email', 'dummy@dummy.tld');
Expand Down

0 comments on commit 5dc6e04

Please sign in to comment.