Skip to content

Commit

Permalink
add unit test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
PratikFandade committed Oct 23, 2024
1 parent 8dfa4e2 commit 160bea7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/unit/winston/container.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@ describe('Container', function () {
assume(container.get('default-test')).equals(defaultTest);
});

it('.getAll(default-test)', function () {
container.add('appLogger');
container.add('serviceLogger');

var allLogger = container.getAll();
var appLogger = container.getAll(/^app/);
var matchLogg = container.getAll(/Logger$/);
var emptyLogg = container.getAll(/Library/);

assume(allLogger.size).equals(3);
assume(allLogger.has('appLogger')).true();
assume(allLogger.has('serviceLogger')).true();

assume(appLogger.size).equals(1);
assume(appLogger.has('appLogger')).true();

assume(matchLogg.size).equals(2);
assume(matchLogg.has('appLogger')).true();
assume(matchLogg.has('serviceLogger')).true();

assume(emptyLogg.size).equals(0);
});

it('.has(default-test)', function () {
assume(container.has('default-test')).true();
});
Expand Down

0 comments on commit 160bea7

Please sign in to comment.