Debian Codegraph @

test/instrumentation/test-es6-import.js

raw
1 /*jslint nomen: true */
2 var helper = require('../helper'),
3 code,
4 verifier;
5
6 if (require('../es6').isImportAvailable()) {
7 module.exports = {
8 'should cover import statements': function (test) {
9 code = [
10 'import util from "util";',
11 'output = util.format(args[0], args[1]);'
12 ];
13 verifier = helper.verifier(__filename, code, {
14 esModules: true,
15 noAutoWrap: true
16 });
17 verifier.verify(test, ['foo:%s', 'bar'], 'foo:bar', {
18 lines: {'2': 1},
19 branches: {},
20 functions: {},
21 statements: {'1': 1}
22 });
23 test.done();
24 }
25 };
26 }