-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexTest.js
More file actions
36 lines (29 loc) · 1.11 KB
/
Copy pathindexTest.js
File metadata and controls
36 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const fs = require('fs')
const path = require('path')
const js = fs.readFileSync(path.resolve(__dirname, '..', 'index.js'), 'utf-8')
describe('index.js', function () {
describe('companyName', function () {
it('is set as Scuber', function () {
expect(companyName).to.equal('Scuber');
});
it('is defined as a const', function () {
expect(js).to.match(/const companyName/, "Expected companyName to be a const");
});
});
describe('mostProfitableNeighborhood', function () {
it('is declared as equal to Chelsea', function () {
expect(mostProfitableNeighborhood).to.equal('Chelsea');
});
it('is defined using let', function () {
expect(js).to.match(/let mostProfitableNeighborhood/, "Expected mostProfitableNeighborhood to be defined using let");
});
});
describe('companyCeo', function () {
it('is declared as equal to Susan Smith', function () {
expect(companyCeo).to.equal('Susan Smith');
});
it('is defined using let', function () {
expect(js).to.match(/let companyCeo/, "Expected companyCeo to be defined using let");
});
});
});