mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
29 lines
725 B
JavaScript
29 lines
725 B
JavaScript
'use strict';
|
|
|
|
const test = require('supertape');
|
|
const entity = require('../../common/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();
|
|
});
|
|
|
|
test('cloudcmd: entity: encode', (t) => {
|
|
const result = entity.encode('"hello"');
|
|
const expected = '"hello"';
|
|
|
|
t.equal(result, expected, 'should encode entity');
|
|
t.end();
|
|
});
|
|
|