fix: minor improvement

This commit is contained in:
Zhicheng Wang 2017-08-06 13:49:04 +08:00
parent 7e5fb1d5fa
commit 104edf62f0
1 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,10 @@
// TODO: replace mocha with jasmine
const { expect } = require('chai');
const { mark} = require('./translator');
const { mark } = require('./translator');
it('mark translation results and origins', () => {
expect(mark('<h1>AngularJS to Angular</h1>\n<h1>从 AngularJS 到 Angular 快速参考</h1>'))
.equal('<h1 translation-origin=off >AngularJS to Angular</h1>\n<h1 translation-result >从 AngularJS 到 Angular 快速参考</h1>');
describe('translator', () => {
it('mark translation results and origins', () => {
expect(mark('<h1>AngularJS to Angular</h1>\n<h1>从 AngularJS 到 Angular 快速参考</h1>'))
.toEqual('<h1 translation-origin=off >AngularJS to Angular</h1>\n<h1 translation-result >从 AngularJS 到 Angular 快速参考</h1>');
});
});