New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

utiny

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utiny

Allows unit testing of ES6 modules without additional dependencies right in your browser.

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

utiny

Tired of installing 25 dependencies, just to run unit tests? utiny is the essence of unit testing JavaScript modules.

It allows unit testing of ES6 modules without additional dependencies, right in your browser.

Demo: http://shaack.com/projekte/utiny/test/

Works like this

  • Create a test/index.html:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Tests</title>
</head>
<body>
<script type="module">
    import "./TestMyModule.js"
</script>
</body>
</html>
  • Create the test module TestMyModule.js.
import {describe, it, assert} from "../src/utiny.js";

describe("utiny", () => {
    it("will not fail", () => {
        assert.true(2 * 2 === 4)
    })
    it("will fail", () => {
        assert.equals(4 + 2, 42)
    })
})

Keywords

test

FAQs

Package last updated on 29 Mar 2021

Did you know?

Socket

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.

Install

Related posts