Skip to content

Commit 04ad44c

Browse files
committed
Add IIFE test
1 parent 937498f commit 04ad44c

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
@@ -457,6 +457,23 @@ tape( 'the function analyzes a JavaScript program (anonymous function)', opts, f
457457
t.end();
458458
});
459459

460+
tape( 'the function analyzes a JavaScript program (iife)', opts, function test( t ) {
461+
var expected;
462+
var fpath;
463+
var prog;
464+
var o;
465+
466+
fpath = join( __dirname, 'fixtures', 'iife.js.txt' );
467+
prog = readFileSync( fpath );
468+
469+
expected = require( './fixtures/iife.json' );
470+
471+
o = analyze( prog );
472+
t.deepEqual( o, expected, 'returns expected value' );
473+
474+
t.end();
475+
});
476+
460477
tape( 'the function analyzes a JavaScript program (medley)', opts, function test( t ) {
461478
var expected;
462479
var fpath;

0 commit comments

Comments
 (0)