Total Complexity | 7 |
Complexity/F | 1 |
Lines of Code | 23 |
Function Count | 7 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | 'use strict'; |
||
2 | |||
3 | var expect = require('expect.js'); |
||
4 | var Config = require('../lib/config'); |
||
5 | |||
6 | describe('Config', function() { |
||
7 | describe('readFile', function() { |
||
8 | it('should throw an error when configPath is not valid', function () { |
||
9 | expect(function() { |
||
10 | new Config('./config/unknown'); |
||
11 | }).to.throwError(); |
||
12 | }); |
||
13 | }); |
||
14 | describe('parseConfig', function() { |
||
15 | var config = new Config('./config/tests'); |
||
16 | it('should set config.topRightPos', function () { |
||
17 | expect(config.topRightPos).to.only.have.keys('x', 'y'); |
||
18 | }); |
||
19 | it('should set config.mowers', function () { |
||
20 | expect(config.mowers).to.not.be.empty(); |
||
21 | }); |
||
22 | }); |
||
23 | }); |