-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add garbage collection tests, and fix scrubFields
- Loading branch information
Showing
9 changed files
with
60 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import hideSecrets from 'hide-secrets'; | ||
|
||
export default function(obj, config = {}) { | ||
return hideSecrets(obj, { badWords: config.scrubFields }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { iterate } from 'leakage'; | ||
import Logger from '../../../'; | ||
|
||
|
||
describe('Heap Tests - we-js-logger', function() { | ||
let log; | ||
|
||
beforeEach(() => { | ||
log = new Logger({ stdout: false }); | ||
}); | ||
|
||
it('does not leak when logging 1k times', function() { | ||
this.timeout(20000); | ||
iterate(1000, () => { | ||
log.info('log time'); | ||
}); | ||
}); | ||
|
||
it('does not leak when building and logging child 1k times', function() { | ||
this.timeout(20000); | ||
iterate(1000, () => { | ||
const child = log.child(); | ||
child.info('child time'); | ||
}); | ||
}); | ||
}); | ||
|