2.1.0 • Published 3 years ago

utiny v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

utiny

Tired of installing 25 dependencies, just to run unit tests? utiny is the essence of unit testing for 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

  1. 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>
  1. 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)
    })
})
2.1.1

3 years ago

2.1.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago