-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07a8529
commit 2c2d7d8
Showing
2 changed files
with
44 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { beforeAll, describe, expect, test } from 'bun:test'; | ||
import log from '../../src/utils/log'; | ||
import { omitConsoleLogs } from '../helpers'; | ||
|
||
describe('Utils: log', () => { | ||
beforeAll(() => { | ||
omitConsoleLogs(); | ||
}); | ||
|
||
test('should log info message', () => { | ||
const info = log.info(['info'], 'optional'); | ||
expect(info).toBeUndefined(); | ||
}); | ||
|
||
test('should log success message', () => { | ||
const success = log.success(['success'], 'optional'); | ||
expect(success).toBeUndefined(); | ||
}); | ||
|
||
test('should log warning message', () => { | ||
const warning = log.warning(['warning'], 'optional'); | ||
expect(warning).toBeUndefined(); | ||
}); | ||
|
||
test('should log dimmed warning message', () => { | ||
const dimmedWarning = log.dimmedWarning(['dimmed warning'], 'optional'); | ||
expect(dimmedWarning).toBeUndefined(); | ||
}); | ||
|
||
test('should log error message', () => { | ||
const error = log.error(['error'], 'optional'); | ||
expect(error).toBeUndefined(); | ||
}); | ||
}); |