Sha256: dd91c802b2e027498509b508df8225f45fd9d192cbe52f54b5a7de21586111be

Contents?: true

Size: 1.05 KB

Versions: 19

Compression:

Stored size: 1.05 KB

Contents

/*
 * require-directory-test.js: Tests for `requireDir` and `requireDirLazy`
 * methods.
 *
 * (C) 2011, Nodejitsu Inc.
 * MIT LICENSE
 *
 */

var assert = require('assert'),
    path = require('path'),
    vows = require('vows'),
    macros = require('./helpers/macros'),
    utile = require('../');

var requireFixtures = path.join(__dirname, 'fixtures', 'require-directory');

vows.describe('utile/require-directory').addBatch({
  'When using utile': {
    'the `requireDir()` function': {
      topic: utile.requireDir(requireFixtures),
      'should contain all wanted modules': macros.assertDirectoryRequired
    },
    'the `requireDirLazy()` function': {
      topic: utile.requireDirLazy(requireFixtures),
      'all properties should be getters': function (obj) {
        assert.isObject(obj);
        assert.isTrue(!!Object.getOwnPropertyDescriptor(obj, 'directory').get);
        assert.isTrue(!!Object.getOwnPropertyDescriptor(obj, 'helloWorld').get);
      },
      'should contain all wanted modules': macros.assertDirectoryRequired
    }
  }
}).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/require-directory-test.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/utile/test/require-directory-test.js
hooch-0.4.2 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js