Skip to content

Commit 15c304b

Browse files
committed
Add callback expression test
1 parent 04ad44c commit 15c304b

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/_tools/js/program-summary/test

lib/node_modules/@stdlib/_tools/js/program-summary/test/test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,23 @@ tape( 'the function analyzes a JavaScript program (iife)', opts, function test(
474474
t.end();
475475
});
476476

477+
tape( 'the function analyzes a JavaScript program (callback function expression)', opts, function test( t ) {
478+
var expected;
479+
var fpath;
480+
var prog;
481+
var o;
482+
483+
fpath = join( __dirname, 'fixtures', 'callback_function_expression.js.txt' );
484+
prog = readFileSync( fpath );
485+
486+
expected = require( './fixtures/callback_function_expression.json' );
487+
488+
o = analyze( prog );
489+
t.deepEqual( o, expected, 'returns expected value' );
490+
491+
t.end();
492+
});
493+
477494
tape( 'the function analyzes a JavaScript program (medley)', opts, function test( t ) {
478495
var expected;
479496
var fpath;

0 commit comments

Comments
 (0)