ascript">// file: tests/math-test.js
var o = require(&quot;mithril/ospec/ospec&quot;)

o.spec(&quot;math&quot;, function() {
    o(&quot;addition works&quot;, function() {
        o(1 + 2).equals(3)
    })
})
</code></pre>
<p>To run the test, use the command <code>npm test</code>. Ospec considers any Javascript file inside of a <code>tests</code> folder (anywhere in the project) to be a test.</p>
<pre><code>npm test
</code></pre><hr>
<h3 id="running-mithril-in-a-non-browser-environment"><a href="#running-mi