mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
refactor afterEach and beforeEach compliments_spec
This commit is contained in:
parent
474695643f
commit
5af2768d33
@ -6,21 +6,23 @@ const expect = chai.expect;
|
|||||||
describe("Compliments module", function () {
|
describe("Compliments module", function () {
|
||||||
this.timeout(20000);
|
this.timeout(20000);
|
||||||
|
|
||||||
|
|
||||||
|
beforeEach(function (done) {
|
||||||
|
app.start().then(function() { done(); } );
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function (done) {
|
||||||
|
app.stop().then(function() { done(); });
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
describe("parts of days", function() {
|
describe("parts of days", function() {
|
||||||
|
|
||||||
before(function() {
|
before(function() {
|
||||||
// Set config sample for use in test
|
// Set config sample for use in test
|
||||||
process.env.MM_CONFIG_FILE = "tests/configs/modules/compliments/compliments_parts_day.js";
|
process.env.MM_CONFIG_FILE = "tests/configs/modules/compliments/compliments_parts_day.js";
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(function (done) {
|
|
||||||
app.start().then(function() { done(); } );
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function (done) {
|
|
||||||
app.stop().then(function() { done(); });
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
it("if Morning compliments for that part of day", function () {
|
it("if Morning compliments for that part of day", function () {
|
||||||
var hour = new Date().getHours();
|
var hour = new Date().getHours();
|
||||||
if (hour >= 3 && hour < 12) {
|
if (hour >= 3 && hour < 12) {
|
||||||
@ -59,15 +61,6 @@ describe("Compliments module", function () {
|
|||||||
|
|
||||||
describe("Feature anytime in compliments module", function() {
|
describe("Feature anytime in compliments module", function() {
|
||||||
|
|
||||||
beforeEach(function (done) {
|
|
||||||
app.start().then(function() { done(); } );
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function (done) {
|
|
||||||
app.stop().then(function() { done(); });
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
describe("Set anytime and empty compliments for morning, evening and afternoon ", function() {
|
describe("Set anytime and empty compliments for morning, evening and afternoon ", function() {
|
||||||
before(function() {
|
before(function() {
|
||||||
// Set config sample for use in test
|
// Set config sample for use in test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user