mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-27 00:16:44 +00:00
Use es6 notation in compliments module and cleanup jsdoc
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
var config = {
|
||||
let config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/* Magic Mirror Test config compliments with date type
|
||||
*
|
||||
* By Rejas
|
||||
*
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
let config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
@@ -3,8 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
var config = {
|
||||
let config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
|
@@ -3,8 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
var config = {
|
||||
let config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
|
@@ -9,7 +9,7 @@ const afterEach = global.afterEach;
|
||||
describe("Compliments module", function () {
|
||||
helpers.setupTimeout(this);
|
||||
|
||||
var app = null;
|
||||
let app = null;
|
||||
|
||||
beforeEach(function () {
|
||||
return helpers
|
||||
@@ -32,7 +32,7 @@ describe("Compliments module", function () {
|
||||
});
|
||||
|
||||
it("if Morning compliments for that part of day", async function () {
|
||||
var hour = new Date().getHours();
|
||||
const hour = new Date().getHours();
|
||||
if (hour >= 3 && hour < 12) {
|
||||
// if morning check
|
||||
const elem = await app.client.$(".compliments");
|
||||
@@ -43,9 +43,9 @@ describe("Compliments module", function () {
|
||||
});
|
||||
|
||||
it("if Afternoon show Compliments for that part of day", async function () {
|
||||
var hour = new Date().getHours();
|
||||
const hour = new Date().getHours();
|
||||
if (hour >= 12 && hour < 17) {
|
||||
// if morning check
|
||||
// if afternoon check
|
||||
const elem = await app.client.$(".compliments");
|
||||
return elem.getText(".compliments").then(function (text) {
|
||||
expect(text).to.be.oneOf(["Hello", "Good Afternoon", "Afternoon test"]);
|
||||
@@ -54,7 +54,7 @@ describe("Compliments module", function () {
|
||||
});
|
||||
|
||||
it("if Evening show Compliments for that part of day", async function () {
|
||||
var hour = new Date().getHours();
|
||||
const hour = new Date().getHours();
|
||||
if (!(hour >= 3 && hour < 12) && !(hour >= 12 && hour < 17)) {
|
||||
// if evening check
|
||||
const elem = await app.client.$(".compliments");
|
||||
|
Reference in New Issue
Block a user