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

Version Path
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/utile/test/file-test.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/utile/test/file-test.js
hooch-0.4.2 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js