mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 07:40:43 +01:00
failing tests for #5102
This commit is contained in:
@@ -108,7 +108,7 @@ describe('new Translator(language)', function(){
|
||||
});
|
||||
|
||||
it('should properly escape % and ,', function(done) {
|
||||
var translator = new Translator('en_GB');
|
||||
var translator = new Translator('en_GB');
|
||||
|
||||
var title = 'Test 1, 2, 3 % salmon';
|
||||
title = title.replace(/%/g, '%').replace(/,/g, ',');
|
||||
@@ -126,6 +126,13 @@ describe('new Translator(language)', function(){
|
||||
done();
|
||||
});
|
||||
|
||||
it('should not translate [[derp] some text', function(done) {
|
||||
var translator = new Translator('en_GB');
|
||||
translator.translate('[[derp] some text').then(function(translated) {
|
||||
assert.strictEqual('[[derp] some text', translated);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -112,5 +112,12 @@ describe('translator adaptor', function(){
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should not translate [[derp] some text', function(done) {
|
||||
translator.translate('[[derp] some text', function(translated) {
|
||||
assert.strictEqual('[[derp] some text', translated);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user