This repository has been archived on 2021-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
simpledash/bulma/node_modules/@nodelib/fs.walk/out/settings.spec.js

29 lines
1.3 KiB
JavaScript
Raw Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const fsScandir = require("@nodelib/fs.scandir");
const settings_1 = require("./settings");
describe('Settings', () => {
it('should return instance with default values', () => {
const fsWalkSettings = new settings_1.default();
const fsScandirSettings = new fsScandir.Settings({
followSymbolicLinks: undefined,
fs: undefined,
pathSegmentSeparator: undefined,
stats: undefined,
throwErrorOnBrokenSymbolicLink: undefined
});
assert.strictEqual(fsWalkSettings.basePath, undefined);
assert.strictEqual(fsWalkSettings.concurrency, Infinity);
assert.strictEqual(fsWalkSettings.deepFilter, null);
assert.strictEqual(fsWalkSettings.entryFilter, null);
assert.strictEqual(fsWalkSettings.errorFilter, null);
assert.deepStrictEqual(fsWalkSettings.fsScandirSettings, fsScandirSettings);
});
it('should return instance with custom values', () => {
const filter = () => true;
const fsWalkSettings = new settings_1.default({ entryFilter: filter });
assert.strictEqual(fsWalkSettings.entryFilter, filter);
});
});