{"id":17918364,"url":"https://github.com/olton/latte","last_synced_at":"2026-04-10T18:27:31.970Z","repository":{"id":257802794,"uuid":"862966262","full_name":"olton/latte","owner":"olton","description":"Latte - Framework for testing JavaScript/TypeScript with DOM and React support and built-in headless browser!","archived":false,"fork":false,"pushed_at":"2025-03-22T05:47:59.000Z","size":1147,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T06:26:07.893Z","etag":null,"topics":["dom","framework","html","javascript","react","react-testing","test","testing","typescript"],"latest_commit_sha":null,"homepage":"https://latte.org.ua","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olton.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-25T13:43:44.000Z","updated_at":"2025-03-22T05:48:02.000Z","dependencies_parsed_at":"2024-09-27T17:40:59.846Z","dependency_job_id":"c274d3b1-2c09-488f-b6bd-ef6d981a6625","html_url":"https://github.com/olton/latte","commit_stats":null,"previous_names":["olton/easytest","olton/latte"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olton%2Flatte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olton%2Flatte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olton%2Flatte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olton%2Flatte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olton","download_url":"https://codeload.github.com/olton/latte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186594,"owners_count":20574551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dom","framework","html","javascript","react","react-testing","test","testing","typescript"],"created_at":"2024-10-28T20:10:55.580Z","updated_at":"2026-04-10T18:27:26.913Z","avatar_url":"https://github.com/olton.png","language":"JavaScript","funding_links":["https://www.patreon.com/metroui","https://buymeacoffee.com/pimenov"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🥛 Latte\n\n[![NPM Version](https://img.shields.io/npm/v/@olton/latte?color=green)](https://www.npmjs.com/package/@olton/latte)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?color=7852a9)](https://opensource.org/licenses/MIT)\n![NPM Downloads](https://img.shields.io/npm/dw/%40olton%2Flatte?color=blue)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n\nLatte (an abbreviation from `laconic testing`) is a testing framework designed for testing applications written in JavaScript and TypeScript.\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n### **It is designed to be straightforward to use, with a focus on speed, performance, and user information.**\n\n\u003c/div\u003e\n\n---\n\nLatte is an alternative to other testing frameworks like Jest, Mocha, and Jasmine with the following **core features:**\n\n- Config free.\n- Functions for creating test cases `it`, `test`, `describe`, `suite` or `expect`.\n- Setup and Teardown functions `beforeEach`, `afterEach`, `beforeAll`, `afterAll`.\n- React Components testing (`jsx` syntax supported).\n- HTML Components testing (DOM built-in).\n- Headless browser in scope `B` for test web pages and remote saites.\n- Asynchronous code testing with `async/await`.\n- Mock functions.\n- Big set (100+) of built-in matchers.\n- TypeScript testing out of the box. You can use both `js` and `ts` test files in the same project.\n- Simple extend `Expect` class for adding your matchers.\n- A lot of expects in one test case.\n- Built-in coverage tool.\n- `Verbose`, `Watching` and `Debug` mode.\n- Different Reporters: `lcov`, `console`, `html`, and `junit`.\n- Open source and MIT license.\n\n---\n\u003cdiv align=\"center\"\u003e\nDocumentation: https://latte.org.ua/\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n![Demo](demo.gif)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n## Quick Reference\n\n\u003c/div\u003e\n\n### Installation\n\n```bash\nnpm install @olton/latte -D\n```\n\n### Usage\n\n#### IntelliJ plugin\nYou can use Latte with IntelliJ IDEA, WebStorm, PhpStorm, and other JetBrains IDEs. The plugin is available in the [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/27190-latte-test-runner).\n\n#### Command line\n\nCreate a test file with `*.test.js` or `*.test.ts` extension (for example).\nYou can use both of them in the same project.\n\n```js\nfunction hello() {\n    return \"Hello\"\n}\n\ndescribe(`Common tests suite`, () =\u003e {\n    it(`says hello`, () =\u003e {\n        return expect(hello()).toBe(\"Hello\")\n    })\n})\n\ntest(`Bad test 2 !== 1`, () =\u003e {\n    return expect(2).toBe(1)\n})\n\n```\n\nUpdate `package.json` to run tests with `latte` command.\n```json\n{\n    \"scripts\": {\n        \"test\": \"latte\"\n    }\n}\n```\n\n#### Run tests\n\nNow you can run tests with the following command:\n\n```bash\nnpm test\n```\n\nor with `npx`:\n\n```bash\nnpx latte\n```\n\n### Functions\n- `describe` – create a test suite\n- `it` - create a test case in suite\n- `test` - create standalone test\n- `expect` - create assertion\n- `beforeEach` - run before each test case\n- `afterEach` - run after each test case\n- `beforeAll` - run before all test cases\n- `afterAll` - run after all test cases\n- `mock` - create mock function\n\n### Matchers\nLatte contains a big set of built-in matchers:\n\n- A simple comparison\n- A strong comparison\n- Type checking\n- Number checking\n- String checking\n- Array checking\n- Object checking\n- Color checking\n- IP, Email, Url checking\n- JSON, XML checking\n- Date, RegExp, Symbol checking\n- Function checking\n- HTML element checking\n- and more...\n\n\n### TypeScript\nTo use `Latte` with TypeScript you need to install `tsx` package.\n```bash\nnpm install -D tsx cross-env\n```\nand then \n```json\n{\n    \"scripts\": {\n        \"test\": \"cross-env NODE_OPTIONS=\\\"--import tsx\\\" latte\"\n    }\n}\n```\n\n## License\nLatte licensed under MIT license.\n\n## Contributing\n\n### Bug Reports \u0026 Feature Requests\nUse issue tracker to report bugs or request new features.\n\n---\n### Code Standards\n[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)\n\n--- \n## Support\n\nIf you like this project, please consider supporting it by:\n\n+ Star this repository on GitHub\n+ Sponsor this project on GitHub Sponsors\n+ **PayPal** to `serhii@pimenov.com.ua`.\n+ [**Patreon**](https://www.patreon.com/metroui)\n+ [**Buy me a coffee**](https://buymeacoffee.com/pimenov)\n\n---\n\nCopyright (c) 2025 by [Serhii Pimenov](https://pimenov.com.ua)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folton%2Flatte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folton%2Flatte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folton%2Flatte/lists"}