jsxgettext-andris
Version:
Extracts gettext strings from JavaScript, EJS, Jade, Jinja and Handlebars files. A fork of https://github.com/zaach/jsxgettext
16 lines (11 loc) • 404 B
JavaScript
;
var fs = require('fs');
exports.compareResultWithFile = function (result, filePath, assert, cb, msg) {
// Ignore the header
result = result.slice(result.indexOf('\n\n') + 2).trimRight();
fs.readFile(filePath, function (err, source) {
var sourceContent = source.toString('utf8').trimRight();
assert.equal(result, sourceContent, msg || 'Results match.');
cb();
});
};