more lint fixes
This commit is contained in:
parent
dbc0ed53a1
commit
341a5cce61
2 changed files with 11 additions and 2 deletions
|
@ -91,6 +91,7 @@ module.exports = {
|
||||||
],
|
],
|
||||||
env: {
|
env: {
|
||||||
mocha: true,
|
mocha: true,
|
||||||
|
node: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1009,9 +1009,17 @@ describe('Path', () => {
|
||||||
it('Should log an error when splitting a path on a non-point', () => {
|
it('Should log an error when splitting a path on a non-point', () => {
|
||||||
let invalid = false
|
let invalid = false
|
||||||
const log = { error: () => (invalid = true) }
|
const log = { error: () => (invalid = true) }
|
||||||
|
const pointLog = { warning: () => {} }
|
||||||
try {
|
try {
|
||||||
const a = new Path().__withLog(log).move(new Point(0, 0)).line(new Point(0, 40)).split()
|
new Path()
|
||||||
} catch {
|
.__withLog(log)
|
||||||
|
.move(new Point(0, 0).__withLog(pointLog))
|
||||||
|
.line(new Point(0, 40).__withLog(pointLog))
|
||||||
|
.split()
|
||||||
|
} catch (e) {
|
||||||
|
expect(e.toString()).to.include(
|
||||||
|
"TypeError: Cannot read properties of undefined (reading '__check')"
|
||||||
|
)
|
||||||
} finally {
|
} finally {
|
||||||
expect(invalid).to.equal(true)
|
expect(invalid).to.equal(true)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue