
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Allows unit testing of ES6 modules without additional dependencies right in your browser.
Tired of installing 1000 dependencies, just to run unit tests? Teevi is the essence of unit testing in JavaScript.
It allows unit testing of JS without additional dependencies, right in your browser. Teevi has almost the same syntax as Mocha with Chai but is a hundred times smaller.
Demo: http://shaack.com/projekte/teevi/test/
MyTest.jsimport {describe, it, assert} from "../src/teevi.js";
describe("Teevi test demo", () => {
it("will not fail", () => {
assert.true(2 * 2 === 4)
})
it("will fail", () => {
assert.equals(4 + 2, 42)
})
})
test/index.html to run the tests in your browser<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tests</title>
</head>
<body>
<script type="module">
import {teevi} from "./src/teevi.js"
import "./MyTest.js"
teevi.run()
</script>
</body>
</html>

Use it.only(condition, testMethod) to run only these tests in your test module.
assert.fail(message = DEFAULT_MESSAGE)assert.true(message = DEFAULT_MESSAGE)assert.false(message = DEFAULT_MESSAGE)equal(actual, expected, message = DEFAULT_MESSAGE)notEqual(actual, notExpected, message = DEFAULT_MESSAGE)reject(message) from an async Promise (see example below)You can also test async calls, with the use of promises.
it("should test async", () => {
return new Promise((resolve) => {
setTimeout(() => {
// `resolve`, if test succeeds
resolve()
}, 500)
})
})
it("should fail async", () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
// in Promises use `reject()`, not `assert`
reject("failed, because of testing")
}, 500)
})
})
FAQs
Allows unit testing of ES6 modules without additional dependencies right in your browser.
We found that teevi demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.