mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Run prettier over ALL files once
No other changes done in this commit
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
/* eslint no-multi-spaces: 0 */
|
||||
var expect = require("chai").expect;
|
||||
|
||||
describe("Functions module currentweather", function() {
|
||||
|
||||
describe("Functions module currentweather", function () {
|
||||
// Fake for use by currentweather.js
|
||||
Module = {};
|
||||
config = {};
|
||||
@@ -11,58 +10,56 @@ describe("Functions module currentweather", function() {
|
||||
Module.definitions[name] = moduleDefinition;
|
||||
};
|
||||
|
||||
before(function(){
|
||||
before(function () {
|
||||
require("../../../modules/default/currentweather/currentweather.js");
|
||||
Module.definitions.currentweather.config = {};
|
||||
});
|
||||
|
||||
describe("roundValue", function() {
|
||||
|
||||
describe("this.config.roundTemp is true", function() {
|
||||
before(function(){
|
||||
describe("roundValue", function () {
|
||||
describe("this.config.roundTemp is true", function () {
|
||||
before(function () {
|
||||
Module.definitions.currentweather.config.roundTemp = true;
|
||||
});
|
||||
|
||||
var values = [
|
||||
// index 0 value
|
||||
// index 1 expect
|
||||
[1 , "1"],
|
||||
[1.0 , "1"],
|
||||
[1.02 , "1"],
|
||||
[10.12 , "10"],
|
||||
[2.0 , "2"],
|
||||
["2.12" , "2"],
|
||||
[10.1 , "10"]
|
||||
[1, "1"],
|
||||
[1.0, "1"],
|
||||
[1.02, "1"],
|
||||
[10.12, "10"],
|
||||
[2.0, "2"],
|
||||
["2.12", "2"],
|
||||
[10.1, "10"]
|
||||
];
|
||||
|
||||
values.forEach(value => {
|
||||
it(`for ${value[0]} should be return ${value[1]}`, function() {
|
||||
values.forEach((value) => {
|
||||
it(`for ${value[0]} should be return ${value[1]}`, function () {
|
||||
expect(Module.definitions.currentweather.roundValue(value[0])).to.equal(value[1]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("this.config.roundTemp is false", function() {
|
||||
|
||||
before(function(){
|
||||
describe("this.config.roundTemp is false", function () {
|
||||
before(function () {
|
||||
Module.definitions.currentweather.config.roundTemp = false;
|
||||
});
|
||||
|
||||
var values = [
|
||||
// index 0 value
|
||||
// index 1 expect
|
||||
[1 , "1.0"],
|
||||
[1.0 , "1.0"],
|
||||
[1.02 , "1.0"],
|
||||
[10.12 , "10.1"],
|
||||
[2.0 , "2.0"],
|
||||
["2.12" , "2.1"],
|
||||
[10.1 , "10.1"],
|
||||
[10.10 , "10.1"]
|
||||
[1, "1.0"],
|
||||
[1.0, "1.0"],
|
||||
[1.02, "1.0"],
|
||||
[10.12, "10.1"],
|
||||
[2.0, "2.0"],
|
||||
["2.12", "2.1"],
|
||||
[10.1, "10.1"],
|
||||
[10.1, "10.1"]
|
||||
];
|
||||
|
||||
values.forEach(value => {
|
||||
it(`for ${value[0]} should be return ${value[1]}`, function() {
|
||||
values.forEach((value) => {
|
||||
it(`for ${value[0]} should be return ${value[1]}`, function () {
|
||||
expect(Module.definitions.currentweather.roundValue(value[0])).to.equal(value[1]);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user