mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-17 16:38:18 +00:00
feature: cloudcmd: rendy v5.0.0
This commit is contained in:
parent
cdeb40d191
commit
7ef134f46f
9 changed files with 41 additions and 9 deletions
|
|
@ -172,6 +172,39 @@ test('cloudfunc: buildFromJSON: showDotFiles: false', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cloudfunc: buildFromJSON: showDotFiles: false', (t) => {
|
||||
const data = {
|
||||
path: '/media/',
|
||||
files: [{
|
||||
date: '30.08.2016',
|
||||
mode: 'rwx rwx rwx',
|
||||
name: '{{}}',
|
||||
owner: 'root',
|
||||
size: '7b',
|
||||
type: 'file',
|
||||
}],
|
||||
};
|
||||
|
||||
const html = buildFromJSON({
|
||||
prefix: '',
|
||||
template,
|
||||
data,
|
||||
showDotFiles: false,
|
||||
});
|
||||
|
||||
const $ = cheerio.load(html);
|
||||
const el = $('[data-name="js-file-JTdCJTdCJTdEJTdE"]');
|
||||
|
||||
const result = el
|
||||
.find('[data-name="js-name"]')
|
||||
.text();
|
||||
|
||||
const expected = '{{}}';
|
||||
|
||||
t.equal(result, expected);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudfunc: _getDataName', (t) => {
|
||||
const result = _getDataName('s');
|
||||
const expected = 'data-name="js-file-cw==" ';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue