mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
test(entity) add
This commit is contained in:
parent
02e835eb06
commit
0aab46588d
1 changed files with 21 additions and 0 deletions
21
test/server/entity.js
Normal file
21
test/server/entity.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('tape');
|
||||
const entity = require('../../server/entity');
|
||||
|
||||
test('cloudcmd: entity: encode', (t) => {
|
||||
const result = entity.encode('<hello> ');
|
||||
const expected = '<hello> ';
|
||||
|
||||
t.equal(result, expected, 'should encode entity');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: entity: decode', (t) => {
|
||||
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