Skip to content

Commit

Permalink
fix(settings): correct default value for `throwErrorOnBrokenSymbolicL…
Browse files Browse the repository at this point in the history
…ink`
  • Loading branch information
mrmlnc committed Jun 9, 2019
1 parent 9ab065b commit 2b5bc54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions src/settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ describe('Settings', () => {
assert.ok(settings.stats);
});

it('should set the "throwErrorOnBrokenSymbolicLink" option to "true" when the "stats" option is enabled', () => {
const settings = new Settings({
stats: true
});

assert.ok(settings.stats);
assert.ok(settings.throwErrorOnBrokenSymbolicLink);
});

it('should return the `fs` option with custom method', () => {
const customReaddirSync = () => [];

Expand Down
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default class Settings {
public readonly onlyFiles: boolean = this._getValue(this._options.onlyFiles, true);
public readonly stats: boolean = this._getValue(this._options.stats, false);
public readonly suppressErrors: boolean = this._getValue(this._options.suppressErrors, false);
public readonly throwErrorOnBrokenSymbolicLink: boolean = this.stats && this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
public readonly throwErrorOnBrokenSymbolicLink: boolean = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
public readonly unique: boolean = this._getValue(this._options.unique, true);

constructor(private readonly _options: Options = {}) {
Expand Down

0 comments on commit 2b5bc54

Please sign in to comment.