UNPKG
mocha-jsdom
Version:
latest (2.0.0)
2.0.0
1.2.0
1.1.0
1.0.0
0.5.0
0.4.0
0.3.0
0.2.1
0.2.0
0.1.1
0.1.0
Simple integration of jsdom into mocha tests
github.com/rstacruz/mocha-jsdom
rstacruz/mocha-jsdom
mocha-jsdom
/
examples
/
basic
/
test.js
15 lines
(11 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* global describe, it, before, expect */
require
(
'./setup'
)
describe
(
'my library'
,
function
(
) {
var
mylib
before
(
function
(
) { mylib =
require
(
'mylib'
) ||
window
.
mylib
})
it
(
'works'
,
function
(
) {
expect
(mylib.
greet
()).
to
.
eql
(
'hola'
) }) })