
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Small and fast Typescript unit testing library with no dependencies
Small and fast Typescript unit testing library with no dependencies.
yarn add briefest --dev
npm install briefest --save-dev
UMD file is also available on unpkg:
<script src="https://unpkg.com/briefest/briefest.umd.min.js"></script>
You can use the library via window.briefest
.
import { test } from "briefest"
test("Simple tests", (t, done) => {
t.isPrimitive(-1)
t.isPrimitive(2n ** 8n)
t.isEqualPrimitive(undefined, undefined)
t.isEqual("", "")
t.isEqual(64n, 2n ** 6n)
t.isNotEqual({}, {})
t.isNotEqual(new Date(), new Date())
done()
})
import { test } from "briefest"
const callbackTest = (cb: (v: number) => void) => setTimeout(() => cb(500), 200)
const asyncTest = () => new Promise<number>((resolve) => setTimeout(() => resolve(600), 100))
test("Async tests", (t, done) => {
callbackTest(async (val) => {
t.isEqual(500, val)
// an async/await example
t.isEqual(600, await asyncTest())
done()
})
})
Feel free to send some pull request or issue.
MIT license
© 2020 Jose Quintana
FAQs
Small and fast Typescript unit testing library with no dependencies
The npm package briefest receives a total of 9 weekly downloads. As such, briefest popularity was classified as not popular.
We found that briefest 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.