File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
lib/node_modules/@stdlib/array/dtype/test Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2323var tape = require ( 'tape' ) ;
2424var dtypes = require ( '@stdlib/array/dtypes' ) ;
2525var ctors = require ( '@stdlib/array/ctors' ) ;
26+ var allocUnsafe = require ( '@stdlib/buffer/alloc-unsafe' ) ;
2627var dtype = require ( './../lib' ) ;
2728
2829
@@ -64,6 +65,16 @@ tape( 'the function does not support array-like objects', function test( t ) {
6465 t . end ( ) ;
6566} ) ;
6667
68+ tape ( 'the function returns `null` if provided a Node.js Buffer' , function test ( t ) {
69+ var buf ;
70+ var dt ;
71+
72+ buf = allocUnsafe ( 10 ) ;
73+ dt = dtype ( buf ) ;
74+ t . strictEqual ( dt , null , 'returns expected value' ) ;
75+ t . end ( ) ;
76+ } ) ;
77+
6778tape ( 'if provided an argument having an unknown/unsupported data type, the function returns `null`' , function test ( t ) {
6879 var buffers ;
6980 var i ;
You can’t perform that action at this time.
0 commit comments