Quick Start
Latte is a powerful testing framework that allows you to write tests for your applications with ease. This quick start guide will help you set up Latte and run your first test.
Installation
Install Latte as a development dependency in your project.
You can do this using your favorite package manager.
Here are the commands for some popular package managers:
npm install -D @olton/lattepnpm -D install @olton/latteyarn add -D @olton/lattebun add -D @olton/latteAdd command to package.json
Add the following command to your package.json file:
{ "scripts": { "test": "latte" }}Create your first test
Create a new file named example.test.js in your project directory and add the following code:
function hello() { return "Hello"}
describe(`Common tests suite`, () => { it(`says hello`, () => { return expect(hello()).toBe("Hello") })})Run the test
Run the following command in your terminal:
npm testpnpm testyarn testbun test