pofile/test/comments.js

26 lines
709 B
JavaScript
Raw Normal View History

2013-12-17 17:42:55 +04:00
var assert = require('assert');
var PO = require('..');
2013-12-17 17:44:18 +04:00
describe('Comments', function () {
2013-12-17 17:42:55 +04:00
var po;
before(function (done) {
PO.load(__dirname + '/fixtures/big.po', function (err, result) {
assert.equal(err, null);
po = result;
done();
});
});
it('Parses the po file', function () {
assert.notEqual(po, null);
});
it('Parses the comments', function () {
assert.equal(po.comments.length, 3);
assert.equal(po.comments[0], 'French translation of Link (6.x-2.9)');
assert.equal(po.comments[1], 'Copyright (c) 2011 by the French translation team');
assert.equal(po.comments[2], '');
});
});