Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: TinnyTerr <168141209+TinnyTerr@users.noreply.github.com>
  • Loading branch information
TinnyTerr committed Nov 25, 2024
1 parent 8444a00 commit 4f0c208
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions tests/test.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { logger } = require('../dist/commonjs/index.cjs');
const { Logger } = require('../dist/index.js');

const log = new logger('test', { logLevel: 0 });
const log = new Logger('test');

log.trace('test trace');
log.trace('test trace with data', { thisIs: true, andNot: false });
Expand All @@ -20,7 +20,9 @@ log.error('test error with data', { thisIs: true, andNot: false });
log.fatal('test fatal');
log.fatal('test fatal with data', { thisIs: true, andNot: false });

const logIndent = new logger('test', { logLevel: 0, indent: 4 });
const logIndent = new Logger('indent', {
console: { logLevel: 0, format: true, indent: 4 },
});

logIndent.trace('test trace');
logIndent.trace('test trace with data', { thisIs: true, andNot: false });
Expand Down
6 changes: 3 additions & 3 deletions tests/test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { logger } from '../dist/es6/index.mjs';
import { Logger } from '../dist/index.mjs';

const log = new logger('test', { logLevel: 0 });
const log = new Logger('test');

log.trace('test trace');
log.trace('test trace with data', { thisIs: true, andNot: false });
Expand All @@ -20,7 +20,7 @@ log.error('test error with data', { thisIs: true, andNot: false });
log.fatal('test fatal');
log.fatal('test fatal with data', { thisIs: true, andNot: false });

const logIndent = new logger('test', { logLevel: 0, indent: 4 });
const logIndent = new Logger('indent', { logLevel: 0, indent: 4 });

logIndent.trace('test trace');
logIndent.trace('test trace with data', { thisIs: true, andNot: false });
Expand Down

0 comments on commit 4f0c208

Please sign in to comment.