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

38 lines (32 loc) 961 B
describe("formatter - addRemoveLeadingZeros", function () { let input; let length; let sliced; let expected; describe("addRemoveLeadingZeros - add zeros to the number", async function () { it("Preparation", function () { input = "12"; length = 4; expected = "0012"; }); it("Execution", function () { sliced = util.formatter.addRemoveLeadingZeros(input, length); }); it("Verification", async function () { await common.assertion.expectEqual(sliced, expected); }); }); describe("addRemoveLeadingZeros - remove zeros from number", async function () { it("Preparation", function () { input = "00012"; length = 3; expected = "012"; }); it("Execution", function () { sliced = util.formatter.addRemoveLeadingZeros(input, length); }); it("Verification", async function () { await common.assertion.expectEqual(sliced, expected); }); }); });