
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
ts-minitest
Advanced tools
> A simple assertion and testing library with only one dependency - [`picocolors`](https://www.npmjs.com/package/picocolors). > Built to be small and easy to include in environments where running a full-fledged test runner may be difficult > to set up.
A simple assertion and testing library with only one dependency -
picocolors
. Built to be small and easy to include in environments where running a full-fledged test runner may be difficult to set up.
- Mimics part of the Jest
expect()
API.- Supports both ESM and CommonJS
npm install --save-dev ts-minitest
Anywhere in your code where you want to run tests, import the library and describe
your tests. These tests will
run immediately, emit any errors to the console.
import { it, describe, expect } from "ts-minitest";
describe("my test suite", () => {
it("should throw an error if the assertion fails", () => {
expect(true).toBe(false);
});
it("should not throw an error as the assertion passes", () => {
expect(true).toBe(true);
});
});
This library was built to be small and easy to include in any environment where you just need to run a few quick
tests programmatically. It is not intended to be a full-fledged test runner, and does not have any of the comforts
that you would have from a full-fledged test runner like Jest
or Vitest
.
A good use case would be if you need tests to run in the browser. For example, for running a suite of tests on request by the user or developer.
// local-storage.test.ts
import { it, describe, expect } from "ts-minitest";
describe("local storage", () => {
it("should have a session ID", () => {
const sessionId = window.localStorage.getItem("session-id");
expect(typeof sessionId).toBe("string");
expect(sessionId.length).not.toBe("");
});
});
FAQs
> A simple assertion and testing library with only one dependency - [`picocolors`](https://www.npmjs.com/package/picocolors). > Built to be small and easy to include in environments where running a full-fledged test runner may be difficult > to set up.
The npm package ts-minitest receives a total of 1 weekly downloads. As such, ts-minitest popularity was classified as not popular.
We found that ts-minitest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.