1.1.13 • Published 4 years ago

mulika v1.1.13

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Mulika, Tiniest JavaScript Test Tool

Install mulika

npm i mulika 

Mulika CDN

Minimal in-browser UI add-on to your pages! Google Chrome, MS Edge recommended anf Firefox.

Mulika Terminal

Add the scripts above any files to be tested in your html page.

<script src="https://pwafire.org/code/mulika/@latest.js"></script>

Add styles to your html page

<link rel="stylesheet" href="https://pwafire.org/code/mulika/@latest.css" />

Add the html component at the bottom of your html page

<section id="mulika" class="mulika">
    <div class="top">
        <div class="btns">
            <span class="circle red"></span>
            <span class="circle yellow"></span>
            <span class="circle green"></span>
            <span class="mulika-title">Mulika Tests</span>
        </div>
    </div>
    <pre class="tests" id="tests"></pre>
</section>

Configuring for in-browser mulika

In your test js file, you need to enable debug/dev mode and start mulika first as shown below, all at the top of the test file.

// Mulika...
mulika.debug = true;
mulika.start();

//...

Specification...

All variables must be provided, all are required!

// Type check...
mulika.typeCheck({ type: type, value: value });

// Other tests...
mulika.expect(message, func, expected_value);

Example...

Launch Playground Here

// Require mulika...
const mulika = require("mulika");

const registered = true;
// 1. Type check...
mulika.typeCheck({ type: "boolean", value: registered });

// 2. All tests...
mulika.expect("Sum to be 1", add(1, 9), 1);
// Function to test...
function add(a, b) {
    return a + b;
}

Enjoy!

1.1.14-alpha.1

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.0

4 years ago

1.0.91

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago