-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick-test.js
More file actions
66 lines (53 loc) · 1.95 KB
/
quick-test.js
File metadata and controls
66 lines (53 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import { createColorino } from './dist/node.mjs'
const colorino = createColorino()
console.log('\n--- Gradient Tests ---')
console.log(colorino.gradient('█'.repeat(50), '#00ff00', '#ff00ff'))
console.log(colorino.gradient('COLORINO', '#ffd700', '#ff1493'))
// Standalone gradient
colorino.log(colorino.gradient('Hello!', '#ff0000', '#0000ff'))
// Gradient with additional text
colorino.log(colorino.gradient('Hello!', '#ff0000', '#0000ff'), 'second string')
// Mixed with other text
const title = colorino.gradient('COLORINO', '#ffd700', '#ff1493')
colorino.info('Welcome to', title, '– the smart logger')
// Combine multiple effects
const badge = colorino.colorize('v2.0', '#00ff00')
const brand = colorino.gradient('Colorino', '#ff6b6b', '#4ecdc4')
colorino.log(brand, badge, 'shipped!')
console.log('\n--- Trace Tests: Default (hide colorino, show node) ---')
colorino.trace('test', new Error('TestoErroro'))
colorino.trace('test', new Error('TestoErroro').stack)
colorino.trace('test', { testo: 'objecto' })
console.log('\n--- Trace Tests: Hide both ---')
const colorino2 = createColorino(
{},
{
areNodeFramesVisible: false,
areColorinoFramesVisible: false,
}
)
colorino2.trace('test', new Error('TestoErroro'))
colorino2.trace('test', new Error('TestoErroro').stack)
colorino2.trace('test', { testo: 'objecto' })
console.log('\n--- Trace Tests: Hide node, show colorino ---')
const colorino3 = createColorino(
{},
{
areNodeFramesVisible: false,
areColorinoFramesVisible: true,
}
)
colorino3.trace('test', new Error('TestoErroro'))
colorino3.trace('test', new Error('TestoErroro').stack)
colorino3.trace('test', { testo: 'objecto' })
console.log('\n--- Trace Tests: Show both ---')
const colorino4 = createColorino(
{},
{
areNodeFramesVisible: true,
areColorinoFramesVisible: true,
}
)
colorino4.trace('test', new Error('TestoErroro'))
colorino4.trace('test', new Error('TestoErroro').stack)
colorino4.trace('test', { testo: 'objecto' })