 path = require 'path'
 should = require('chai').should()
 
+require 'colors'
 
 describe '[log]', ->
 

    error 'Hello world'
    error 'Hello world', 1
    error 'Hello world', 1, 2
    
  it 'warn', (done)->
    msgs = [
      'warn Hello world'

    warn 'Hello world'
    warn 'Hello world', 1
    warn 'Hello world', 1, 2  

  it 'warn with colors', (done)->
    msgs = [
      "#{'warn'.bold.yellow} #{'Hello world'.grey}"
      "#{'warn'.bold.yellow} #{'Hello world'.grey} 1"
      "#{'warn'.bold.yellow} #{'Hello world'.grey} 1 2"
    ]

    global.__stderr = (data)->
      data.should.equal msgs.shift()
      done() unless msgs.length

    global.__nocolor = false

    delete global.__nocolor
    {warn} = require('../../../lib/utils/logger')()
    warn 'Hello world'
    warn 'Hello world', 1
    warn 'Hello world', 1, 2

    global.__nocolor = true

  it 'info', (done)->
    msgs = [
