UNPKG
mocha-inline
Version:
latest (0.0.2)
0.0.2
0.0.1
Small helper to write mocha tests inlined.
github.com/yamadapc/mocha-inline
yamadapc/mocha-inline
mocha-inline
/
example.js
14 lines
(10 loc)
•
203 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require
(
'./'
)();
function
add
(x, y)
{
return
x + y; } describe(
'add(x, y)'
,
function
()
{ var
assert
=
require
(
'assert'
); it(
'add(1, 1) is 2'
,
function
()
{
assert
(add(
1
,
1
) ===
2
); }); });