Jest & Vitest
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
Jest-i dhe Vitest-i janë mjetet më të përdorura për të shkruar teste në JavaScript. Shkruan test() me një përshkrim dhe kontrollon me expect(...).toBe(...); komanda npm test i ekzekuton të gjitha.
EnglishEN
Jest and Vitest are the most-used tools for writing tests in JavaScript. You write test() with a description and check with expect(...).toBe(...); the npm test command runs them all.
Si ta mendosh
Si provat para provimit: i kalon një nga një dhe e di menjëherë ku je gati e ku jo.
Lexoje në anglisht
Like practice tests before the exam: you go through them one by one and know at once where you're ready and where you're not.
Shembull kodijavascript
import { test, expect } from "vitest";
test("mbledh dy numra", () => {
expect(mblidh(2, 3)).toBe(5);
});