2 * file-test.js: Tests for `utile.file` module.
4 * (C) 2011, Nodejitsu Inc.
9 var assert = require('assert'),
10 path = require('path'),
11 vows = require('vows'),
12 macros = require('./helpers/macros'),
13 utile = require('../');
15 var fixture = path.join(__dirname, 'fixtures', 'read-json-file', 'config.json');
17 vows.describe('utile/file').addBatch({
19 'the `.file.readJson()` function': {
21 utile.file.readJson(fixture, this.callback);
23 'should return correct JSON structure': macros.assertReadCorrectJson
25 'the `.file.readJsonSync()` function': {
26 topic: utile.file.readJsonSync(fixture),
27 'should return correct JSON structure': macros.assertReadCorrectJson