Skip to content

Commit d4db4a8

Browse files
committed
updates test for const
1 parent 63baba7 commit d4db4a8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/indexTest.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
const chai = require('chai')
22
const expect = chai.expect;
3+
const fs = require('file-system')
4+
const jsdom = require('mocha-jsdom')
5+
const path = require('path')
6+
const babel = require('babel-core');
7+
8+
const js = fs.readFileSync(path.resolve(__dirname, '..', 'index.js'), 'utf-8')
9+
10+
311

412
describe('index.js', function () {
513
describe('companyName', function () {
614
it('is set as Scuber', function () {
715
expect(companyName).to.equal('Scuber');
816
});
917

10-
it('raises error if the companyName is changed', function () {
11-
expect(function () { companyName = 'specialCompany' }).to.throw(TypeError);
18+
it('is defined as a const', function () {
19+
expect(js).to.match(/const companyName/, "Expected companyName to be a const");
1220
});
1321
});
1422

0 commit comments

Comments
 (0)