Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/plato.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ exports.inspect = function(files, outputDir, options, done) {
return path.join(file,innerFile);
});
runReports(files);
} else if (file.match(/\.js$/)) {
} else if (file.match(/\.(js|es|es6)$/)) {
log.info('Reading "%s"', file);

var fileShort = file.replace(commonBasePath, '');
Expand Down
11 changes: 11 additions & 0 deletions test/fixtures/test.es
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var a = 1;

function fnA(arg) {
return arg;
}

function fnB(arg) {
return arg;
}

var b = fnB(1) + fnA(2);
14 changes: 13 additions & 1 deletion test/plato_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ exports['plato'] = {
test.done();
});
},

'should run jshint with default config' : function(test) {

var files = [
Expand All @@ -130,5 +129,18 @@ exports['plato'] = {
test.ok(overview.summary.total.jshint === 2, 'Should contain total jshint issues');
test.done();
});
},
'test file ending checks' : function(test) {
var files = [
'test/fixtures/test.es'
];

test.expect(1);

plato.inspect(files, null, {}, function(reports) {
var overview = plato.getOverviewReport(reports);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overview var is not needed

test.ok(reports.length === 1, 'Should analyze 1 file');
test.done();
});
}
};