-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAtrix.specs.js
38 lines (30 loc) · 1.09 KB
/
Atrix.specs.js
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
37
38
'use strict';
/* eslint-env node, mocha */
/* eslint prefer-arrow-callback: 0, func-names: 0, space-before-function-paren: 0, no-unused-expressions: 0, arrow-body-style: 0 */
const { expect } = require('chai');
const symbols = require('./lib/symbols');
const Atrix = require('./Atrix');
const atrix = new Atrix();
const { version } = require('./package.json');
describe('atrix', () => {
it('exposes property "config"', () => {
expect(atrix.config).to.be.an('object');
});
it('cannot set property "config"', () => {
expect(() => {
atrix.config = {};
}).to.throw();
});
it('exposes function "configure"', () => {
expect(atrix.configure).to.be.a('function');
});
it('exposes "version"', () => {
expect(atrix.version).to.eql(version);
});
describe('exposed symbols', () => {
Object.keys(symbols).forEach(key => {
it(`exposed "atrix.${key}"`, () => expect(atrix[key]).to.eql(symbols[key]));
it(`exposed "Atrix.${key}"`, () => expect(Atrix[key]).to.eql(symbols[key]));
});
});
});