mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature: cloudfunc: get rid of mock-require
This commit is contained in:
parent
6e99c7e3c5
commit
fcce26d4e1
2 changed files with 42 additions and 49 deletions
28
common/entity.spec.js
Normal file
28
common/entity.spec.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('supertape');
|
||||
const entity = require('./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 quote', (t) => {
|
||||
const result = entity.encode('"hello"');
|
||||
const expected = '"hello"';
|
||||
|
||||
t.equal(result, expected, 'should encode entity');
|
||||
t.end();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue