1
0
ergogen/test/unit/internals.js

23 lines
657 B
JavaScript
Raw Permalink Normal View History

2023-01-23 14:34:06 -08:00
const m = require('makerjs')
const pcb_lib = require('../../src/pcbs')
const ergogen = require('../../src/ergogen')
describe('Internals', function() {
it('makerjs2kicad', function() {
// warn on unknown path type
sinon.stub(m.model, 'walk').callsFake(function(model, config) {
config.onPath({pathContext: {type: 'nonexistent'}})
})
pcb_lib._makerjs2kicad.bind(this).should.throw("Can't convert path type")
})
it('injection', function() {
// warn on unknown injection type
ergogen.inject.bind(this, 'nonexistent', 'name', 'value').should.throw('Unknown injection type')
})
})