Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/share/nodejs/fast-glob/out/readers/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const path = require("path");
const fs_macchiato_1 = require("@nodelib/fs.macchiato");
const settings_1 = require("../settings");
const reader_1 = require("./reader");
class TestReader extends reader_1.default {
constructor(options) {
super(new settings_1.default(options));
}
dynamic() {
return [];
}
static() {
return [];
}
getFullEntryPath(filepath) {
return this._getFullEntryPath(filepath);
}
makeEntry(stats, pattern) {
return this._makeEntry(stats, pattern);
}
}
function getReader(options) {
return new TestReader(options);
}
describe('Readers → Reader', () => {
describe('Constructor', () => {
it('should create instance of class', () => {
const reader = getReader();
assert.ok(reader instanceof TestReader);
});
});
describe('.getFullEntryPath', () => {
it('should return path to entry', () => {
const reader = getReader();
const expected = path.join(process.cwd(), 'config.json');
const actual = reader.getFullEntryPath('config.json');
assert.strictEqual(actual, expected);
});
});
describe('.makeEntry', () => {
it('should return created entry', () => {
const reader = getReader();
const pattern = 'config.json';
const actual = reader.makeEntry(new fs_macchiato_1.Stats(), pattern);
assert.strictEqual(actual.name, pattern);
assert.strictEqual(actual.path, pattern);
assert.ok(actual.dirent.isFile());
});
it('should return created entry with fs.Stats', () => {
const reader = getReader({ stats: true });
const pattern = 'config.json';
const actual = reader.makeEntry(new fs_macchiato_1.Stats(), pattern);
assert.ok(actual.stats);
});
});
});
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0131 ]-- |