Skip to content

Commit 9a4fde2

Browse files
authored
Merge pull request #435 from joknelid/1.7
Export Integer type
2 parents c7d80dd + ca67bc7 commit 9a4fde2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/v1/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919

20-
import {inSafeRange, int, isInt, toNumber, toString} from './integer';
20+
import Integer, {inSafeRange, int, isInt, toNumber, toString} from './integer';
2121
import {Node, Path, PathSegment, Relationship, UnboundRelationship} from './graph-types';
2222
import {Neo4jError, PROTOCOL_ERROR, SERVICE_UNAVAILABLE, SESSION_EXPIRED} from './error';
2323
import Result from './result';
@@ -258,7 +258,8 @@ const types = {
258258
Duration,
259259
LocalDateTime,
260260
LocalTime,
261-
Time
261+
Time,
262+
Integer
262263
};
263264

264265
/**

test/v1/integer.test.js

+5
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ describe('Integer', () => {
6565
expect(Integer.MAX_SAFE_VALUE.add(999).toNumberOrInfinity()).toEqual(Number.POSITIVE_INFINITY);
6666
});
6767

68+
it('type is exported', () => {
69+
expect(neo4j.types.Integer).toBeDefined();
70+
expect(neo4j.int(1) instanceof neo4j.types.Integer).toBeTruthy();
71+
});
72+
6873
});

0 commit comments

Comments
 (0)