You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError('The neo4j Vector class does not support Unsigned Integer Arrays, please use a signed IntArray')
71
64
}else{
72
-
// @ts-expect-error
73
-
thrownewError(`The neo4j Vector class is a wrapper for TypedArrays. got ${(typedArray.toString()asstring)}`)
65
+
thrownewError(`Invalid argument type passed to Vector constructor: should be signed integer or float TypedArray, got: ${(typedArrayasany)?.constructor?.nameasstring??'undefined or type without constructor name'}`)
thrownewError('Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got unsigned integer TypedArray')
142
-
}
143
-
thrownewError(`Invalid argument type passed to vector constructor function: should be TypedArray, got ${typedArray.toString()}`)
127
+
thrownewError(`Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got: ${typedArray?.constructor?.name??'undefined or type without constructor name'}`)
Copy file name to clipboardExpand all lines: packages/core/test/vector-type.test.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,9 @@ describe('Vector', () => {
33
33
})
34
34
35
35
it.each([
36
-
['array',[],'should be TypedArray, got'],
37
-
['Unsigned TypedArray',Uint16Array.from([]),'should be signed integer or float TypedArray, got unsigned integer TypedArray']
36
+
['array',[],'Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got: Array'],
37
+
['Unsigned TypedArray',Uint16Array.from([]),'Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got: Uint16Array'],
38
+
['undefined',undefined,'Invalid argument type passed to vector constructor function: should be signed integer or float TypedArray, got: undefined or type without constructor name']
38
39
])('should fail to create create vector from (%s)',(_,typedArray,expectedMessage)=>{
0 commit comments