Bringing points stuff up to spec
This commit is contained in:
parent
0ab5a246e5
commit
a5e686b059
11 changed files with 474 additions and 108 deletions
17
test/complex.js
Normal file
17
test/complex.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const fs = require('fs-extra')
|
||||
const path = require('path')
|
||||
const yaml = require('js-yaml')
|
||||
const points_lib = require('../src/points')
|
||||
|
||||
const fixtures = path.join(__dirname, 'fixtures')
|
||||
const absolem_config = yaml.load(fs.readFileSync(path.join(fixtures, 'absolem.yaml')).toString())
|
||||
|
||||
describe('Absolem', function() {
|
||||
it('#points', function() {
|
||||
const expected = fs.readJSONSync(path.join(fixtures, 'absolem_points.json'))
|
||||
const actual = points_lib.parse(absolem_config.points)
|
||||
// remove metadata, so that it only checks the points
|
||||
Object.values(actual).map(val => delete val.meta)
|
||||
actual.should.deep.equal(expected)
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue