Getting coverage to 100%

This commit is contained in:
Bán Dénes 2023-01-23 23:34:06 +01:00
parent b27e10374e
commit c45523f38a
25 changed files with 2393 additions and 2282 deletions

View file

@ -107,6 +107,32 @@ exports.inject = (ergogen) => {
}
})
ergogen.inject('footprint', 'arrobj_test', {
params: {
designator: 'T',
side: 'F',
start: {x: 0, y: 0},
end: [[1, 0], [0, 1]]
},
body: p => {
lines = ''
for (const item of p.end) {
lines += `(fp_line (start ${p.start.x} ${p.start.y}) (end ${item[0]} ${item[1]}) (layer Dwgs.User) (width 0.05))\n`
}
return `
(module arrobj_test (layer ${p.side}.Cu) (tedit 5CF31DEF)
${p.at /* parametric position */}
${lines}
)
`
}
})
ergogen.inject('references_test', {
params: {},
body: p => {

View file

@ -1,4 +1,12 @@
global.chai = require('chai')
global.chai.use(require('chai-as-promised'))
global.expect = global.chai.expect
global.should = global.chai.should()
global.should = global.chai.should()
global.sinon = require('sinon')
// Restore the default sandbox after every test
exports.mochaHooks = {
afterEach() {
sinon.restore()
}
}