Skip to content

Commit 0a06b37

Browse files
committed
Fix equalInterval should.js assertion
The custom equalInterval assertion did not work correctly for Intervals w/ uncertain boundaries. Now it does!
1 parent dba9632 commit 0a06b37

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

test/should-extensions.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,19 @@ declare module 'should' {
1212

1313
should(this.obj?.isInterval).be.ok();
1414
should(expected?.isInterval).be.ok();
15-
this.obj.toClosed().should.eql(expected.toClosed());
15+
const normalizedThis = new Interval(
16+
this.obj.start(),
17+
this.obj.end(),
18+
true,
19+
true,
20+
this.obj.pointType
21+
);
22+
const normalizedExpected = new Interval(
23+
expected.start(),
24+
expected.end(),
25+
true,
26+
true,
27+
expected.pointType
28+
);
29+
normalizedThis.should.eql(normalizedExpected);
1630
});

0 commit comments

Comments
 (0)