mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-11-26 01:16:56 +01:00
28 lines
1.3 KiB
JavaScript
28 lines
1.3 KiB
JavaScript
"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);
|
|
});
|
|
});
|