File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
lib/node_modules/@stdlib/array/base/accessor/test Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 22
22
23
23
var tape = require ( 'tape' ) ;
24
24
var hasOwnProp = require ( '@stdlib/assert/has-own-property' ) ;
25
+ var isAccessorArray = require ( '@stdlib/array/base/assert/is-accessor-array' ) ;
25
26
var AccessorArray = require ( './../lib' ) ;
26
27
27
28
@@ -51,6 +52,12 @@ tape( 'the constructor does not require the `new` keyword', function test( t ) {
51
52
t . end ( ) ;
52
53
} ) ;
53
54
55
+ tape ( 'the function returns an array-like object supporting the accessor protocol' , function test ( t ) {
56
+ var arr = new AccessorArray ( [ 1 , 2 , 3 ] ) ;
57
+ t . strictEqual ( isAccessorArray ( arr ) , true , 'returns expected value' ) ;
58
+ t . end ( ) ;
59
+ } ) ;
60
+
54
61
tape ( 'attached to the constructor is a property returning the constructor name' , function test ( t ) {
55
62
t . strictEqual ( hasOwnProp ( AccessorArray , 'name' ) , true , 'has property' ) ;
56
63
t . strictEqual ( AccessorArray . name , 'AccessorArray' , 'returns expected value' ) ;
You can’t perform that action at this time.
0 commit comments