Sha256: e43e31223c0f6066216b2029cce9074f5394bc86c52054fa27924db21dfa68e2
Contents?: true
Size: 818 Bytes
Versions: 19
Compression:
Stored size: 818 Bytes
Contents
/* * file-test.js: Tests for `utile.file` module. * * (C) 2011, Nodejitsu Inc. * MIT LICENSE * */ var assert = require('assert'), path = require('path'), vows = require('vows'), macros = require('./helpers/macros'), utile = require('../'); var fixture = path.join(__dirname, 'fixtures', 'read-json-file', 'config.json'); vows.describe('utile/file').addBatch({ 'When using utile': { 'the `.file.readJson()` function': { topic: function () { utile.file.readJson(fixture, this.callback); }, 'should return correct JSON structure': macros.assertReadCorrectJson }, 'the `.file.readJsonSync()` function': { topic: utile.file.readJsonSync(fixture), 'should return correct JSON structure': macros.assertReadCorrectJson } } }).export(module);
Version data entries
19 entries across 19 versions & 3 rubygems