mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(entity) add
This commit is contained in:
parent
0aab46588d
commit
520aa075fa
2 changed files with 4 additions and 4 deletions
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
const Entities = {
|
||||
' ': ' ',
|
||||
'<' : '<',
|
||||
'>' : '>'
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
};
|
||||
|
||||
const keys = Object.keys(Entities);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ test('cloudcmd: entity: encode', (t) => {
|
|||
});
|
||||
|
||||
test('cloudcmd: entity: decode', (t) => {
|
||||
const result = entity.decode('<hello>');
|
||||
const expected = '<hello>';
|
||||
const result = entity.decode('<hello> ');
|
||||
const expected = '<hello> ';
|
||||
|
||||
t.equal(result, expected, 'should decode entity');
|
||||
t.end();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue