Skip to content

Commit 63baba7

Browse files
committed
updates tests
1 parent 8ba70f1 commit 63baba7

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

test/helpers.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const chai = require('chai')
2+
const sinon = require('sinon')
3+
global.expect = chai.expect
4+
const fs = require('file-system')
5+
const jsdom = require('mocha-jsdom')
6+
const path = require('path')
7+
const babel = require('babel-core');
8+
9+
const html = fs.readFileSync(path.resolve(__dirname, '..', 'index.html'), 'utf-8')
10+
11+
const babelResult = babel.transformFileSync(
12+
path.resolve(__dirname, '..', 'index.js'), {
13+
presets: ['env']
14+
}
15+
);
16+
17+
const src = babelResult.code
18+
19+
jsdom({
20+
html, src
21+
});

test/indexTest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const chai = require('chai')
12
const expect = chai.expect;
23

34
describe('index.js', function () {

0 commit comments

Comments
 (0)