mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
Update jsdocs
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
const _ = require("lodash");
|
||||
|
||||
/**
|
||||
* @param extendedData
|
||||
* @param {object} extendedData extra data to add to the default mock data
|
||||
* @returns {string} mocked current weather data
|
||||
*/
|
||||
function generateWeather(extendedData = {}) {
|
||||
return JSON.stringify(
|
||||
|
@@ -1,7 +1,8 @@
|
||||
const _ = require("lodash");
|
||||
|
||||
/**
|
||||
* @param extendedData
|
||||
* @param {object} extendedData extra data to add to the default mock data
|
||||
* @returns {string} mocked forecast weather data
|
||||
*/
|
||||
function generateWeatherForecast(extendedData = {}) {
|
||||
return JSON.stringify(
|
||||
|
@@ -13,7 +13,9 @@ describe("Weather module", function () {
|
||||
helpers.setupTimeout(this);
|
||||
|
||||
/**
|
||||
* @param responses
|
||||
*
|
||||
* @param {object} responses mocked data to be returned
|
||||
* @returns {Promise} Resolved once the electron app is started
|
||||
*/
|
||||
async function setup(responses) {
|
||||
app = await helpers.startApplication({
|
||||
@@ -27,15 +29,18 @@ describe("Weather module", function () {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param element
|
||||
*
|
||||
* @param {string} element css selector
|
||||
* @returns {Promise<Element>} Promise with the element once it is rendered
|
||||
*/
|
||||
async function getElement(element) {
|
||||
return await app.client.$(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param element
|
||||
* @param result
|
||||
* @param {string} element css selector
|
||||
* @param {string} result Expected text in given selector
|
||||
* @returns {Promise<boolean>} Promise with True if the text matches
|
||||
*/
|
||||
async function getText(element, result) {
|
||||
const elem = await getElement(element);
|
||||
|
Reference in New Issue
Block a user