mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
15 lines
298 B
JavaScript
15 lines
298 B
JavaScript
import test from 'ava'
|
|
import sinon from 'sinon'
|
|
import { prettyPrint } from '../src/util'
|
|
|
|
test.beforeEach(t => {
|
|
sinon.stub(console, 'log')
|
|
})
|
|
test.afterEach(t => {
|
|
console.log.restore()
|
|
})
|
|
|
|
test('prettyPrint writes to stdout', t => {
|
|
prettyPrint('foo')
|
|
t.true(console.log.calledOnce)
|
|
})
|