REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.96 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/frontend/layout-template.spec.js
Text
Base64
import { expect } from 'chai'; import layoutTemplate from './layout-template.js'; import AdminJS from '../adminjs.js'; describe('layoutTemplate', function () { context('AdminJS with branding options set as a function', function () { const companyName = 'Dynamic Company'; let html; beforeEach(async function () { const adminJs = new AdminJS({ branding: async () => ({ companyName }) }); html = await layoutTemplate(adminJs, undefined, '/'); }); it('renders default company name', function () { expect(html).to.contain(companyName); }); it('links to global bundle', async function () { expect(html).to.contain('global.bundle.js'); }); }); describe('AdminJS with branding options given', function () { const branding = { withMadeWithLove: false, companyName: 'Other name', favicon: '/someImage.png' }; let html; beforeEach(async function () { const adminJs = new AdminJS({ branding }); html = await layoutTemplate(adminJs, undefined, '/'); }); it('renders company name', function () { expect(html).to.contain(branding.companyName); }); it('renders favicon', function () { expect(html).to.contain(`<link rel="shortcut icon" type="image/png" href="${branding.favicon}" />`); }); }); context('custom styles and scripts were defined in AdminJS options', function () { let html; const scriptUrl = 'http://somescript.com'; const styleUrl = 'http://somestyle.com'; beforeEach(async function () { const adminJs = new AdminJS({ assets: { styles: [styleUrl], scripts: [scriptUrl] } }); html = await layoutTemplate(adminJs, undefined, '/'); }); it('adds styles to the head section', function () { expect(html).to.contain(styleUrl); }); it('adds scripts to the body', function () { expect(html).to.contain(scriptUrl); }); }); });
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 7 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
assets
DIR
-
drwxr-xr-x
2026-02-28 00:31:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
components
DIR
-
drwxr-xr-x
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hoc
DIR
-
drwxr-xr-x
2026-02-28 00:31:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hooks
DIR
-
drwxr-xr-x
2026-02-28 00:31:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
interfaces
DIR
-
drwxr-xr-x
2026-02-28 00:31:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
store
DIR
-
drwxr-xr-x
2026-02-28 00:31:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils
DIR
-
drwxr-xr-x
2026-02-28 00:31:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bundle-entry.js
2.65 KB
lrw-r--r--
2026-02-28 00:31:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
global-entry.js
1.09 KB
lrw-r--r--
2026-02-28 00:31:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
211 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
layout-template.js
4.31 KB
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
layout-template.spec.js
1.96 KB
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
login-template.js
4.58 KB
lrw-r--r--
2026-02-28 00:31:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
login-template.spec.js
462 B
lrw-r--r--
2026-02-28 00:31:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).