angular-docs-cn/aio/tools/translator/translate.spec.ts

17 lines
400 B
TypeScript
Raw Normal View History

import { expect } from 'chai';
2018-03-07 08:48:31 +08:00
import { kernelText, lookup } from './translate';
2018-03-02 08:08:39 +08:00
describe('根据字典进行翻译', () => {
it('抽取核心字符', function () {
2018-03-07 08:48:31 +08:00
expect(kernelText(' # Forms ABC. ')).eql('FormsABC');
});
2018-03-02 08:08:39 +08:00
it('查字典', () => {
expect(lookup('# Forms')[0].translation).eql('# 表单');
});
it('对包裹在 a 标签中的内容查字典', () => {
});
});