@@ -1950,13 +1950,22 @@ describe('DateTimeInterval', () => {
19501950 should ( ( ) => ivl . pointFrom ( ) ) . throw ( Error ) ;
19511951 } ) ;
19521952
1953- it ( 'should throw for an interval with null high bound' , function ( ) {
1954- const ivl = new Interval ( DateTime . parse ( '2012-01-01T00:00:00.0+00' ) , null ) ;
1955- should ( ( ) => ivl . pointFrom ( ) ) . throw ( Error ) ;
1953+ it ( 'should return the point value for a unit interval with open high bound' , ( ) => {
1954+ const point = DateTime . parse ( '2012-01-01T00:00:00.0+00' ) ;
1955+ const ivl = new Interval ( point , point . successor ( ) , true , false ) ;
1956+
1957+ ivl . pointFrom ( ) . should . eql ( point ) ;
19561958 } ) ;
19571959
1958- it ( 'should throw for an interval with undefined width' , function ( ) {
1959- const ivl = new Interval ( 0 , 0 , false , false ) ;
1960+ it ( 'should return the point value for a unit interval with limited precision' , ( ) => {
1961+ const point = DateTime . parse ( '2012-01-01' ) ;
1962+ const ivl = new Interval ( point , point ) ;
1963+
1964+ ivl . pointFrom ( ) . should . eql ( point ) ;
1965+ } ) ;
1966+
1967+ it ( 'should throw for an interval with null high bound' , function ( ) {
1968+ const ivl = new Interval ( DateTime . parse ( '2012-01-01T00:00:00.0+00' ) , null ) ;
19601969 should ( ( ) => ivl . pointFrom ( ) ) . throw ( Error ) ;
19611970 } ) ;
19621971 } ) ;
0 commit comments