Skip to content

Commit

Permalink
feat: export traverse function.
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Apr 7, 2018
1 parent f24e3fe commit dd56084
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,6 @@ module.exports.ensureParsed = ensureParsed;
module.exports.extract = extract;
module.exports.compilePattern = compilePattern;
module.exports.depFinder = depFinder;
module.exports.STOP = STOP;
module.exports.SKIP_BRANCH = SKIP_BRANCH;
module.exports.traverse = traverse;
17 changes: 17 additions & 0 deletions spec/index-exports.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';
const test = require('tape');

const astMatcher = require('../index');

test('got exports', t => {
t.ok(astMatcher);
t.ok(astMatcher.setParser);
t.ok(astMatcher.ensureParsed);
t.ok(astMatcher.extract);
t.ok(astMatcher.compilePattern);
t.ok(astMatcher.depFinder);
t.ok(astMatcher.hasOwnProperty('STOP'));
t.ok(astMatcher.hasOwnProperty('SKIP_BRANCH'));
t.ok(astMatcher.traverse);
t.end();
});

0 comments on commit dd56084

Please sign in to comment.