UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

32 lines (24 loc) 789 B
"use strict"; const { verifyDateWithTime } = require("./utils"); describe("date - getCurrentDateAndTime", () => { let dateAct; it("Execution", () => { dateAct = common.date.getCurrentDateAndTime(); }); it("Verification", () => { const dateExp = new Date(); verifyDateWithTime(dateAct, dateExp); }); }); describe("date - getCurrentDateAndTime with format ('mm/dd/yyyy HH:mm:ss')", () => { let dateAct; const format = "mm/dd/yyyy HH:mm:ss"; it("Execution", () => { dateAct = common.date.getCurrentDateAndTime("mm/dd/yyyy HH:mm:ss"); }); it("Verification", () => { const dateExp = new Date(); const dateExpFormatted = util.formatter.formatDateWithTime(dateExp, format); common.assertion.expectEqual(dateAct, dateExpFormatted); }); });