npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@olton/latte

v0.17.5

Published

Simple test framework for JavaScript and TypeScript with DOM supports

Readme

🥛 Latte

NPM Version License: MIT NPM Downloads JavaScript Style Guide

Latte (an abbreviation from laconic testing) is a testing framework designed for testing applications written in JavaScript and TypeScript.


It is designed to be straightforward to use, with a focus on speed, performance, and user information.


Latte is an alternative to other testing frameworks like Jest, Mocha, and Jasmine with the following core features:

  • Config free.
  • Functions for creating test cases it, test, describe, suite or expect.
  • Setup and Teardown functions beforeEach, afterEach, beforeAll, afterAll.
  • React Components testing (jsx syntax supported).
  • HTML Components testing (DOM built-in).
  • Headless browser in scope B for test web pages and remote saites.
  • Asynchronous code testing with async/await.
  • Mock functions.
  • Big set (100+) of built-in matchers.
  • TypeScript testing out of the box. You can use both js and ts test files in the same project.
  • Simple extend Expect class for adding your matchers.
  • A lot of expects in one test case.
  • Built-in coverage tool.
  • Verbose, Watching and Debug mode.
  • Different Reporters: lcov, console, html, and junit.
  • Open source and MIT license.


Demo

Quick Reference

Installation

npm install @olton/latte -D

Usage

IntelliJ plugin

You can use Latte with IntelliJ IDEA, WebStorm, PhpStorm, and other JetBrains IDEs. The plugin is available in the JetBrains Marketplace.

Command line

Create a test file with *.test.js or *.test.ts extension (for example). You can use both of them in the same project.

function hello() {
    return "Hello"
}

describe(`Common tests suite`, () => {
    it(`says hello`, () => {
        return expect(hello()).toBe("Hello")
    })
})

test(`Bad test 2 !== 1`, () => {
    return expect(2).toBe(1)
})

Update package.json to run tests with latte command.

{
    "scripts": {
        "test": "latte"
    }
}

Run tests

Now you can run tests with the following command:

npm test

or with npx:

npx latte

Functions

  • describe – create a test suite
  • it - create a test case in suite
  • test - create standalone test
  • expect - create assertion
  • beforeEach - run before each test case
  • afterEach - run after each test case
  • beforeAll - run before all test cases
  • afterAll - run after all test cases
  • mock - create mock function

Matchers

Latte contains a big set of built-in matchers:

  • A simple comparison
  • A strong comparison
  • Type checking
  • Number checking
  • String checking
  • Array checking
  • Object checking
  • Color checking
  • IP, Email, Url checking
  • JSON, XML checking
  • Date, RegExp, Symbol checking
  • Function checking
  • HTML element checking
  • and more...

TypeScript

To use Latte with TypeScript you need to install tsx package.

npm install -D tsx cross-env

and then

{
    "scripts": {
        "test": "cross-env NODE_OPTIONS=\"--import tsx\" latte"
    }
}

License

Latte licensed under MIT license.

Contributing

Bug Reports & Feature Requests

Use issue tracker to report bugs or request new features.


Code Standards

JavaScript Style Guide


Support

If you like this project, please consider supporting it by:


Copyright (c) 2025 by Serhii Pimenov