├── examples_two ├── index.js ├── node_modules │ ├── chai │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── deep-eql │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ └── type-detect │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── History.md │ │ │ │ ├── .npmignore │ │ │ │ ├── karma.conf.js │ │ │ │ └── History.md │ │ │ └── assertion-error │ │ │ │ ├── .npmignore │ │ │ │ └── History.md │ │ ├── .npmignore │ │ ├── lib │ │ │ └── chai │ │ │ │ ├── utils │ │ │ │ ├── getActual.js │ │ │ │ ├── getName.js │ │ │ │ ├── test.js │ │ │ │ ├── getEnumerableProperties.js │ │ │ │ ├── flag.js │ │ │ │ └── getProperties.js │ │ │ │ └── interface │ │ │ │ └── expect.js │ │ ├── bower.json │ │ └── karma.conf.js │ └── colors │ │ ├── .travis.yml │ │ ├── screenshots │ │ └── colors.png │ │ ├── lib │ │ ├── maps │ │ │ ├── zebra.js │ │ │ ├── america.js │ │ │ ├── random.js │ │ │ └── rainbow.js │ │ └── index.js │ │ ├── safe.js │ │ └── themes │ │ └── generic-logging.js ├── .DS_Store ├── app.js ├── hello_world.js ├── pet.js ├── package.json └── test │ └── app_test.js ├── node_examples ├── node_modules │ ├── mocha │ │ ├── lib │ │ │ ├── browser │ │ │ │ ├── fs.js │ │ │ │ ├── glob.js │ │ │ │ ├── path.js │ │ │ │ ├── debug.js │ │ │ │ ├── escape-string-regexp.js │ │ │ │ └── tty.js │ │ │ ├── interfaces │ │ │ │ └── index.js │ │ │ ├── pending.js │ │ │ ├── reporters │ │ │ │ ├── templates │ │ │ │ │ ├── menu.jade │ │ │ │ │ └── script.html │ │ │ │ ├── index.js │ │ │ │ └── min.js │ │ │ ├── template.html │ │ │ ├── test.js │ │ │ └── hook.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ ├── jade │ │ │ │ ├── mkdirp │ │ │ │ └── supports-color │ │ │ ├── glob │ │ │ │ ├── .npmignore │ │ │ │ ├── node_modules │ │ │ │ │ ├── minimatch │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ ├── lru-cache │ │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ │ ├── foo.js │ │ │ │ │ │ │ │ ├── bar.js │ │ │ │ │ │ │ │ └── CONTRIBUTORS │ │ │ │ │ │ │ └── sigmund │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ └── basic.js │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── extglob-ending-with-state-char.js │ │ │ │ │ │ │ ├── caching.js │ │ │ │ │ │ │ └── brace-expand.js │ │ │ │ │ ├── graceful-fs │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── test │ │ │ │ │ │ │ └── readdir-sort.js │ │ │ │ │ └── inherits │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ └── LICENSE │ │ │ │ ├── .travis.yml │ │ │ │ ├── examples │ │ │ │ │ ├── g.js │ │ │ │ │ └── usr-local.js │ │ │ │ └── test │ │ │ │ │ ├── zz-cleanup.js │ │ │ │ │ ├── globstar-match.js │ │ │ │ │ └── stat.js │ │ │ ├── debug │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── node_modules │ │ │ │ │ └── ms │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── README.md │ │ │ │ ├── component.json │ │ │ │ └── Makefile │ │ │ ├── mkdirp │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── node_modules │ │ │ │ │ └── minimist │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── example │ │ │ │ │ │ └── parse.js │ │ │ │ │ │ └── test │ │ │ │ │ │ ├── whitespace.js │ │ │ │ │ │ ├── parse_modified.js │ │ │ │ │ │ ├── dotted.js │ │ │ │ │ │ ├── default_bool.js │ │ │ │ │ │ ├── dash.js │ │ │ │ │ │ └── long.js │ │ │ │ ├── examples │ │ │ │ │ └── pow.js │ │ │ │ ├── bin │ │ │ │ │ ├── usage.txt │ │ │ │ │ └── cmd.js │ │ │ │ └── test │ │ │ │ │ ├── root.js │ │ │ │ │ ├── opts_fs_sync.js │ │ │ │ │ ├── perm.js │ │ │ │ │ ├── return.js │ │ │ │ │ ├── mkdirp.js │ │ │ │ │ ├── return_sync.js │ │ │ │ │ ├── sync.js │ │ │ │ │ ├── umask.js │ │ │ │ │ ├── opts_fs.js │ │ │ │ │ ├── clobber.js │ │ │ │ │ └── umask_sync.js │ │ │ ├── jade │ │ │ │ ├── node_modules │ │ │ │ │ ├── mkdirp │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── .gitignore.orig │ │ │ │ │ │ ├── .gitignore.rej │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ ├── pow.js │ │ │ │ │ │ │ ├── pow.js.orig │ │ │ │ │ │ │ └── pow.js.rej │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── sync.js │ │ │ │ │ │ │ └── clobber.js │ │ │ │ │ └── commander │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ └── Makefile │ │ │ │ ├── testing │ │ │ │ │ ├── user.jade │ │ │ │ │ ├── head.jade │ │ │ │ │ ├── layout.jade │ │ │ │ │ ├── index.js │ │ │ │ │ ├── index.jade │ │ │ │ │ └── user.js │ │ │ │ ├── index.js │ │ │ │ ├── test.jade │ │ │ │ ├── .npmignore │ │ │ │ └── lib │ │ │ │ │ ├── self-closing.js │ │ │ │ │ ├── inline-tags.js │ │ │ │ │ └── nodes │ │ │ │ │ ├── node.js │ │ │ │ │ ├── doctype.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── literal.js │ │ │ │ │ ├── text.js │ │ │ │ │ ├── comment.js │ │ │ │ │ ├── block-comment.js │ │ │ │ │ ├── each.js │ │ │ │ │ ├── mixin.js │ │ │ │ │ ├── code.js │ │ │ │ │ ├── filter.js │ │ │ │ │ └── case.js │ │ │ ├── escape-string-regexp │ │ │ │ ├── index.js │ │ │ │ └── readme.md │ │ │ ├── supports-color │ │ │ │ ├── cli.js │ │ │ │ ├── readme.md │ │ │ │ └── index.js │ │ │ └── growl │ │ │ │ └── test.js │ │ ├── index.js │ │ ├── images │ │ │ ├── ok.png │ │ │ └── error.png │ │ ├── bin │ │ │ └── options.js │ │ └── README.md │ ├── .bin │ │ ├── _mocha │ │ └── mocha │ ├── chai │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── deep-eql │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ └── type-detect │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── History.md │ │ │ │ ├── .npmignore │ │ │ │ ├── karma.conf.js │ │ │ │ └── History.md │ │ │ └── assertion-error │ │ │ │ ├── .npmignore │ │ │ │ └── History.md │ │ ├── .npmignore │ │ ├── lib │ │ │ └── chai │ │ │ │ ├── utils │ │ │ │ ├── getActual.js │ │ │ │ ├── getName.js │ │ │ │ ├── test.js │ │ │ │ ├── getEnumerableProperties.js │ │ │ │ ├── flag.js │ │ │ │ └── getProperties.js │ │ │ │ └── interface │ │ │ │ └── expect.js │ │ ├── bower.json │ │ └── karma.conf.js │ └── colors │ │ ├── .travis.yml │ │ ├── screenshots │ │ └── colors.png │ │ ├── lib │ │ ├── maps │ │ │ ├── zebra.js │ │ │ ├── america.js │ │ │ ├── random.js │ │ │ └── rainbow.js │ │ └── index.js │ │ ├── themes │ │ └── generic-logging.js │ │ └── safe.js ├── app.js ├── greeting.js ├── pet.js ├── superHero.js ├── test │ └── super_pet_test.js ├── super_pet.js └── package.json ├── testing_example ├── node_modules │ ├── mocha │ │ ├── lib │ │ │ ├── browser │ │ │ │ ├── fs.js │ │ │ │ ├── glob.js │ │ │ │ ├── path.js │ │ │ │ ├── debug.js │ │ │ │ ├── escape-string-regexp.js │ │ │ │ └── tty.js │ │ │ ├── interfaces │ │ │ │ └── index.js │ │ │ ├── reporters │ │ │ │ ├── templates │ │ │ │ │ ├── menu.jade │ │ │ │ │ └── script.html │ │ │ │ ├── index.js │ │ │ │ └── min.js │ │ │ ├── template.html │ │ │ ├── test.js │ │ │ └── hook.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ ├── jade │ │ │ │ └── mkdirp │ │ │ ├── glob │ │ │ │ ├── .npmignore │ │ │ │ ├── node_modules │ │ │ │ │ ├── minimatch │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ ├── lru-cache │ │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ │ └── CONTRIBUTORS │ │ │ │ │ │ │ └── sigmund │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ └── basic.js │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── extglob-ending-with-state-char.js │ │ │ │ │ │ │ ├── caching.js │ │ │ │ │ │ │ └── brace-expand.js │ │ │ │ │ ├── graceful-fs │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── test │ │ │ │ │ │ │ └── readdir-sort.js │ │ │ │ │ └── inherits │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ └── LICENSE │ │ │ │ ├── .travis.yml │ │ │ │ ├── examples │ │ │ │ │ ├── usr-local.js │ │ │ │ │ └── g.js │ │ │ │ └── test │ │ │ │ │ ├── zz-cleanup.js │ │ │ │ │ ├── globstar-match.js │ │ │ │ │ └── stat.js │ │ │ ├── debug │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── node_modules │ │ │ │ │ └── ms │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── README.md │ │ │ │ ├── component.json │ │ │ │ └── Makefile │ │ │ ├── mkdirp │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── node_modules │ │ │ │ │ └── minimist │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── example │ │ │ │ │ │ └── parse.js │ │ │ │ │ │ └── test │ │ │ │ │ │ ├── whitespace.js │ │ │ │ │ │ ├── parse_modified.js │ │ │ │ │ │ ├── dotted.js │ │ │ │ │ │ ├── default_bool.js │ │ │ │ │ │ ├── dash.js │ │ │ │ │ │ └── long.js │ │ │ │ ├── examples │ │ │ │ │ └── pow.js │ │ │ │ ├── bin │ │ │ │ │ ├── usage.txt │ │ │ │ │ └── cmd.js │ │ │ │ └── test │ │ │ │ │ ├── root.js │ │ │ │ │ ├── opts_fs_sync.js │ │ │ │ │ ├── perm.js │ │ │ │ │ ├── return.js │ │ │ │ │ ├── mkdirp.js │ │ │ │ │ ├── return_sync.js │ │ │ │ │ ├── sync.js │ │ │ │ │ ├── umask.js │ │ │ │ │ ├── clobber.js │ │ │ │ │ └── opts_fs.js │ │ │ ├── jade │ │ │ │ ├── node_modules │ │ │ │ │ ├── mkdirp │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── .gitignore.orig │ │ │ │ │ │ ├── .gitignore.rej │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ ├── pow.js │ │ │ │ │ │ │ ├── pow.js.orig │ │ │ │ │ │ │ └── pow.js.rej │ │ │ │ │ │ └── test │ │ │ │ │ │ │ └── sync.js │ │ │ │ │ └── commander │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ └── Makefile │ │ │ │ ├── testing │ │ │ │ │ ├── user.jade │ │ │ │ │ ├── head.jade │ │ │ │ │ ├── layout.jade │ │ │ │ │ ├── index.js │ │ │ │ │ ├── index.jade │ │ │ │ │ └── user.js │ │ │ │ ├── index.js │ │ │ │ ├── test.jade │ │ │ │ ├── .npmignore │ │ │ │ └── lib │ │ │ │ │ ├── self-closing.js │ │ │ │ │ ├── inline-tags.js │ │ │ │ │ └── nodes │ │ │ │ │ ├── node.js │ │ │ │ │ ├── doctype.js │ │ │ │ │ ├── literal.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── text.js │ │ │ │ │ ├── comment.js │ │ │ │ │ ├── block-comment.js │ │ │ │ │ ├── each.js │ │ │ │ │ ├── mixin.js │ │ │ │ │ ├── code.js │ │ │ │ │ ├── filter.js │ │ │ │ │ └── case.js │ │ │ ├── escape-string-regexp │ │ │ │ ├── index.js │ │ │ │ └── readme.md │ │ │ └── growl │ │ │ │ └── test.js │ │ ├── index.js │ │ └── images │ │ │ ├── ok.png │ │ │ └── error.png │ ├── .bin │ │ ├── mocha │ │ └── _mocha │ ├── chai │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── deep-eql │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ └── type-detect │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── History.md │ │ │ │ ├── .npmignore │ │ │ │ ├── karma.conf.js │ │ │ │ └── History.md │ │ │ └── assertion-error │ │ │ │ ├── .npmignore │ │ │ │ └── History.md │ │ ├── .npmignore │ │ ├── lib │ │ │ └── chai │ │ │ │ ├── interface │ │ │ │ └── expect.js │ │ │ │ └── utils │ │ │ │ ├── getActual.js │ │ │ │ ├── getName.js │ │ │ │ ├── test.js │ │ │ │ ├── getEnumerableProperties.js │ │ │ │ ├── flag.js │ │ │ │ └── getProperties.js │ │ ├── bower.json │ │ └── karma.conf.js │ └── colors │ │ ├── .travis.yml │ │ ├── screenshots │ │ └── colors.png │ │ ├── lib │ │ ├── maps │ │ │ ├── zebra.js │ │ │ ├── america.js │ │ │ ├── random.js │ │ │ └── rainbow.js │ │ └── index.js │ │ ├── safe.js │ │ └── themes │ │ └── generic-logging.js ├── sample_test.js ├── package.json └── test │ ├── sample_test_2.js │ └── custom_constructor.js ├── more_node_examples ├── node_modules │ ├── chai │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── deep-eql │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ └── type-detect │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ └── History.md │ │ │ │ ├── .npmignore │ │ │ │ ├── karma.conf.js │ │ │ │ └── History.md │ │ │ ├── type-detect │ │ │ │ ├── index.js │ │ │ │ └── .npmignore │ │ │ └── assertion-error │ │ │ │ ├── .npmignore │ │ │ │ └── History.md │ │ ├── .npmignore │ │ ├── lib │ │ │ └── chai │ │ │ │ ├── utils │ │ │ │ ├── getActual.js │ │ │ │ ├── getName.js │ │ │ │ ├── test.js │ │ │ │ ├── getEnumerableProperties.js │ │ │ │ ├── flag.js │ │ │ │ └── getProperties.js │ │ │ │ └── interface │ │ │ │ └── expect.js │ │ ├── bower.json │ │ └── karma.conf.js │ └── colors │ │ ├── lib │ │ ├── maps │ │ │ ├── zebra.js │ │ │ ├── america.js │ │ │ ├── random.js │ │ │ └── rainbow.js │ │ └── index.js │ │ ├── themes │ │ └── generic-logging.js │ │ └── safe.js ├── test │ └── test.js ├── package.json ├── greeter.js ├── dog.js └── pet.js └── examples ├── node_modules └── colors │ ├── .travis.yml │ ├── screenshots │ └── colors.png │ ├── lib │ ├── maps │ │ ├── zebra.js │ │ ├── america.js │ │ ├── random.js │ │ └── rainbow.js │ └── index.js │ ├── themes │ └── generic-logging.js │ └── safe.js ├── hello_world.js └── package.json /examples_two/index.js: -------------------------------------------------------------------------------- 1 | console.log("Hello world!"); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/browser/fs.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/browser/glob.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/browser/path.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/browser/fs.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /node_examples/node_modules/.bin/_mocha: -------------------------------------------------------------------------------- 1 | ../mocha/bin/_mocha -------------------------------------------------------------------------------- /node_examples/node_modules/.bin/mocha: -------------------------------------------------------------------------------- 1 | ../mocha/bin/mocha -------------------------------------------------------------------------------- /testing_example/node_modules/.bin/mocha: -------------------------------------------------------------------------------- 1 | ../mocha/bin/mocha -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/browser/glob.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/browser/path.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testing_example/node_modules/.bin/_mocha: -------------------------------------------------------------------------------- 1 | ../mocha/bin/_mocha -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/.bin/jade: -------------------------------------------------------------------------------- 1 | ../jade/bin/jade -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/.bin/jade: -------------------------------------------------------------------------------- 1 | ../jade/bin/jade -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/.bin/mkdirp: -------------------------------------------------------------------------------- 1 | ../mkdirp/bin/cmd.js -------------------------------------------------------------------------------- /examples_two/node_modules/chai/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/chai'); 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/.bin/mkdirp: -------------------------------------------------------------------------------- 1 | ../mkdirp/bin/cmd.js -------------------------------------------------------------------------------- /node_examples/node_modules/chai/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/chai'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | test/a/ 3 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/chai'); 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | test/a/ 3 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/chai'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/.bin/supports-color: -------------------------------------------------------------------------------- 1 | ../supports-color/cli.js -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/debug/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "laxbreak": true 3 | } 4 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/debug/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "laxbreak": true 3 | } 4 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/eql'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/eql'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/eql'); 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /examples_two/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/examples_two/.DS_Store -------------------------------------------------------------------------------- /examples_two/app.js: -------------------------------------------------------------------------------- 1 | var greeter = require("./hello_world.js"); 2 | console.log(greeter); 3 | 4 | greeter.foo() -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/eql'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/type-detect/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/type'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /examples/node_modules/colors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" 6 | - "0.6" -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/type'); 2 | -------------------------------------------------------------------------------- /examples_two/node_modules/colors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" 6 | - "0.6" -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/type'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/colors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" 6 | - "0.6" -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/browser/debug.js: -------------------------------------------------------------------------------- 1 | module.exports = function(type){ 2 | return function(){ 3 | } 4 | }; 5 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/foo.js: -------------------------------------------------------------------------------- 1 | console.log(require(".")) 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/commander/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/commander'); -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/type'); 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/browser/debug.js: -------------------------------------------------------------------------------- 1 | module.exports = function(type){ 2 | return function(){ 3 | } 4 | }; 5 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/commander/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/commander'); -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/type'); 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - "0.10" 6 | -------------------------------------------------------------------------------- /testing_example/node_modules/colors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" 6 | - "0.6" -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - "0.10" 6 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/index.js: -------------------------------------------------------------------------------- 1 | module.exports = process.env.COV 2 | ? require('./lib-cov/mocha') 3 | : require('./lib/mocha'); 4 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/index.js: -------------------------------------------------------------------------------- 1 | module.exports = process.env.COV 2 | ? require('./lib-cov/mocha') 3 | : require('./lib/mocha'); 4 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/debug/node_modules/ms/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test 3 | History.md 4 | Makefile 5 | component.json 6 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/testing/user.jade: -------------------------------------------------------------------------------- 1 | h1 Tobi 2 | p Is a ferret 3 | 4 | ul 5 | li: a foo 6 | li: a bar 7 | li: a baz -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/debug/node_modules/ms/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test 3 | History.md 4 | Makefile 5 | component.json 6 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/images/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/node_examples/node_modules/mocha/images/ok.png -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/testing/user.jade: -------------------------------------------------------------------------------- 1 | h1 Tobi 2 | p Is a ferret 3 | 4 | ul 5 | li: a foo 6 | li: a bar 7 | li: a baz -------------------------------------------------------------------------------- /examples/hello_world.js: -------------------------------------------------------------------------------- 1 | var colors = require("colors"); 2 | 3 | 4 | var hello = function () { 5 | console.log("Hello World".blue); 6 | }; 7 | 8 | hello(); 9 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/node_examples/node_modules/mocha/images/error.png -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/images/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/testing_example/node_modules/mocha/images/ok.png -------------------------------------------------------------------------------- /examples/node_modules/colors/screenshots/colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/examples/node_modules/colors/screenshots/colors.png -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = process.env.JADE_COV 3 | ? require('./lib-cov/jade') 4 | : require('./lib/jade'); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/test.jade: -------------------------------------------------------------------------------- 1 | p. 2 | This is a large 3 | body of text for 4 | this tag. 5 | 6 | Nothing too 7 | exciting. -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/example/parse.js: -------------------------------------------------------------------------------- 1 | var argv = require('../')(process.argv.slice(2)); 2 | console.dir(argv); 3 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/testing_example/node_modules/mocha/images/error.png -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = process.env.JADE_COV 3 | ? require('./lib-cov/jade') 4 | : require('./lib/jade'); -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/test.jade: -------------------------------------------------------------------------------- 1 | p. 2 | This is a large 3 | body of text for 4 | this tag. 5 | 6 | Nothing too 7 | exciting. -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/bar.js: -------------------------------------------------------------------------------- 1 | console.log("bar");module.exports = "bar"; require("./foo.js") 2 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/testing/head.jade: -------------------------------------------------------------------------------- 1 | head 2 | script(src='/jquery.js') 3 | yield 4 | if false 5 | script(src='/jquery.ui.js') 6 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/testing/head.jade: -------------------------------------------------------------------------------- 1 | head 2 | script(src='/jquery.js') 3 | yield 4 | if false 5 | script(src='/jquery.ui.js') 6 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/example/parse.js: -------------------------------------------------------------------------------- 1 | var argv = require('../')(process.argv.slice(2)); 2 | console.dir(argv); 3 | -------------------------------------------------------------------------------- /examples_two/node_modules/colors/screenshots/colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/examples_two/node_modules/colors/screenshots/colors.png -------------------------------------------------------------------------------- /node_examples/node_modules/colors/screenshots/colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/node_examples/node_modules/colors/screenshots/colors.png -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej: -------------------------------------------------------------------------------- 1 | --- /dev/null 2 | +++ .gitignore 3 | @@ -0,0 +1,2 @@ 4 | +node_modules/ 5 | +npm-debug.log -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej: -------------------------------------------------------------------------------- 1 | --- /dev/null 2 | +++ .gitignore 3 | @@ -0,0 +1,2 @@ 4 | +node_modules/ 5 | +npm-debug.log -------------------------------------------------------------------------------- /testing_example/node_modules/colors/screenshots/colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfTheDelmer/intermediate_talk/HEAD/testing_example/node_modules/colors/screenshots/colors.png -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TESTS = $(shell find test/test.*.js) 3 | 4 | test: 5 | @./test/run $(TESTS) 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TESTS = $(shell find test/test.*.js) 3 | 4 | test: 5 | @./test/run $(TESTS) 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/testing/layout.jade: -------------------------------------------------------------------------------- 1 | html 2 | include head 3 | script(src='/caustic.js') 4 | script(src='/app.js') 5 | body 6 | block content -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/testing/layout.jade: -------------------------------------------------------------------------------- 1 | html 2 | include head 3 | script(src='/caustic.js') 4 | script(src='/app.js') 5 | body 6 | block content -------------------------------------------------------------------------------- /examples/node_modules/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = function (letter, i, exploded) { 4 | return i % 2 === 0 ? letter : colors.inverse(letter); 5 | }; -------------------------------------------------------------------------------- /examples_two/node_modules/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = function (letter, i, exploded) { 4 | return i % 2 === 0 ? letter : colors.inverse(letter); 5 | }; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/interfaces/index.js: -------------------------------------------------------------------------------- 1 | exports.bdd = require('./bdd'); 2 | exports.tdd = require('./tdd'); 3 | exports.qunit = require('./qunit'); 4 | exports.exports = require('./exports'); 5 | -------------------------------------------------------------------------------- /node_examples/app.js: -------------------------------------------------------------------------------- 1 | 2 | // greeting = { greet: FUNCTION } 3 | var greeting = require("./greeting.js"); 4 | 5 | console.log(greeting); 6 | 7 | greeting.greet("John"); 8 | greeting.greet("Jane"); 9 | 10 | -------------------------------------------------------------------------------- /node_examples/node_modules/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = function (letter, i, exploded) { 4 | return i % 2 === 0 ? letter : colors.inverse(letter); 5 | }; -------------------------------------------------------------------------------- /testing_example/node_modules/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = function (letter, i, exploded) { 4 | return i % 2 === 0 ? letter : colors.inverse(letter); 5 | }; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/interfaces/index.js: -------------------------------------------------------------------------------- 1 | exports.bdd = require('./bdd'); 2 | exports.tdd = require('./tdd'); 3 | exports.qunit = require('./qunit'); 4 | exports.exports = require('./exports'); 5 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = function (letter, i, exploded) { 4 | return i % 2 === 0 ? letter : colors.inverse(letter); 5 | }; -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/assertion-error/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/type-detect/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/assertion-error/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/assertion-error/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | docs/ 3 | test/ 4 | support/ 5 | component.json 6 | components/ 7 | build/ 8 | lib-cov/ 9 | coverage/ 10 | .travis.yml 11 | .mailmap 12 | Makefile 13 | *.swp 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/assertion-error/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | docs/ 3 | test/ 4 | support/ 5 | component.json 6 | components/ 7 | build/ 8 | lib-cov/ 9 | coverage/ 10 | .travis.yml 11 | .mailmap 12 | Makefile 13 | *.swp 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | docs/ 3 | test/ 4 | support/ 5 | component.json 6 | components/ 7 | build/ 8 | lib-cov/ 9 | coverage/ 10 | .travis.yml 11 | .mailmap 12 | Makefile 13 | *.swp 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | docs/ 3 | test/ 4 | support/ 5 | component.json 6 | components/ 7 | build/ 8 | lib-cov/ 9 | coverage/ 10 | .travis.yml 11 | .mailmap 12 | Makefile 13 | *.swp 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | build/ 4 | components/ 5 | support/ 6 | coverage.html 7 | component.json 8 | lib-cov 9 | .travis.yml 10 | Makefile 11 | *.swp 12 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', 0755, function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', 0755, function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /examples_two/hello_world.js: -------------------------------------------------------------------------------- 1 | 2 | // module.exports = {}; 3 | 4 | var bar = function () { 5 | console.log("Goodbye!"); 6 | }; 7 | 8 | 9 | module.exports.salutation = bar; 10 | 11 | module.exports.foo = function () { 12 | console.log("Hello World Again!"); 13 | }; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | support 3 | benchmarks 4 | examples 5 | lib-cov 6 | coverage.html 7 | .gitmodules 8 | .travis.yml 9 | History.md 10 | Readme.md 11 | Makefile 12 | test/ 13 | support/ 14 | benchmarks/ 15 | examples/ 16 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | support 3 | benchmarks 4 | examples 5 | lib-cov 6 | coverage.html 7 | .gitmodules 8 | .travis.yml 9 | History.md 10 | Readme.md 11 | Makefile 12 | test/ 13 | support/ 14 | benchmarks/ 15 | examples/ 16 | -------------------------------------------------------------------------------- /examples/node_modules/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /examples_two/pet.js: -------------------------------------------------------------------------------- 1 | function Pet(name, breed, age, weight) { 2 | 3 | this.name = name; 4 | this.breed = breed; 5 | this.age = age; 6 | this.weight = weight; 7 | 8 | } 9 | 10 | Pet.prototype.sleep = function () { 11 | return "ZzzZZzz"; 12 | }; 13 | 14 | 15 | module.exports = Pet; -------------------------------------------------------------------------------- /examples/node_modules/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype 3 | // 4 | // var colors = require('colors/safe); 5 | // colors.red("foo") 6 | // 7 | // 8 | var colors = require('./lib/colors'); 9 | module['exports'] = colors; -------------------------------------------------------------------------------- /examples_two/node_modules/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype 3 | // 4 | // var colors = require('colors/safe); 5 | // colors.red("foo") 6 | // 7 | // 8 | var colors = require('./lib/colors'); 9 | module['exports'] = colors; -------------------------------------------------------------------------------- /examples_two/node_modules/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /node_examples/greeting.js: -------------------------------------------------------------------------------- 1 | var colors = require("colors"); 2 | 3 | console.log("hello world".red.underline); 4 | 5 | // initially an empty object, {} 6 | module.exports.greet = function (name) { 7 | console.log(name.red.underline); 8 | }; 9 | 10 | // What gets exposed is the module.exports object -------------------------------------------------------------------------------- /node_examples/node_modules/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /node_examples/node_modules/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype 3 | // 4 | // var colors = require('colors/safe); 5 | // colors.red("foo") 6 | // 7 | // 8 | var colors = require('./lib/colors'); 9 | module['exports'] = colors; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /testing_example/node_modules/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype 3 | // 4 | // var colors = require('colors/safe); 5 | // colors.red("foo") 6 | // 7 | // 8 | var colors = require('./lib/colors'); 9 | module['exports'] = colors; -------------------------------------------------------------------------------- /testing_example/node_modules/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype 3 | // 4 | // var colors = require('colors/safe); 5 | // colors.red("foo") 6 | // 7 | // 8 | var colors = require('./lib/colors'); 9 | module['exports'] = colors; -------------------------------------------------------------------------------- /node_examples/pet.js: -------------------------------------------------------------------------------- 1 | function Pet(name, age) { 2 | // adds properties 3 | this.name = name; 4 | this.age = age; 5 | } 6 | 7 | Pet.prototype.walk = function () { 8 | return "Walking!"; 9 | } 10 | 11 | var fluffers = new Pet("fluffers", 10); 12 | 13 | console.log(fluffers); 14 | 15 | module.exports = Pet; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/examples/g.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "test/a/**/[cg]/../[cg]" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/examples/usr-local.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "{./*/*,/*,/usr/local/*}" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/testing/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Module dependencies. 4 | */ 5 | 6 | var jade = require('../'); 7 | 8 | jade.renderFile('testing/index.jade', { pretty: true, debug: true, compileDebug: false }, function(err, str){ 9 | if (err) throw err; 10 | console.log(str); 11 | }); -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/examples/usr-local.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "{./*/*,/*,/usr/local/*}" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/testing/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Module dependencies. 4 | */ 5 | 6 | var jade = require('../'); 7 | 8 | jade.renderFile('testing/index.jade', { pretty: true, debug: true, compileDebug: false }, function(err, str){ 9 | if (err) throw err; 10 | console.log(str); 11 | }); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/pending.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Expose `Pending`. 4 | */ 5 | 6 | module.exports = Pending; 7 | 8 | /** 9 | * Initialize a new `Pending` error with the given message. 10 | * 11 | * @param {String} message 12 | */ 13 | 14 | function Pending(message) { 15 | this.message = message; 16 | } 17 | -------------------------------------------------------------------------------- /node_examples/superHero.js: -------------------------------------------------------------------------------- 1 | 2 | function SuperHero(firstName, lastName) { 3 | this.first = firstName; 4 | this.lastName = lastName; 5 | } 6 | 7 | SuperHero.prototype.superPunch = function() { 8 | return "WHAM!"; 9 | }; 10 | 11 | var spiderMan = new SuperHero("Peter", "Parker"); 12 | 13 | console.log(spiderMan.superPunch()) -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/examples/g.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "test/a/**/[cg]/../[cg]" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var minimatch = require('../') 3 | 4 | test('extglob ending with statechar', function(t) { 5 | t.notOk(minimatch('ax', 'a?(b*)')) 6 | t.ok(minimatch('ax', '?(a*|b)')) 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var minimatch = require('../') 3 | 4 | test('extglob ending with statechar', function(t) { 5 | t.notOk(minimatch('ax', 'a?(b*)')) 6 | t.ok(minimatch('ax', '?(a*|b)')) 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "examples", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "hello_world.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "colors": "^1.0.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/browser/escape-string-regexp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; 4 | 5 | module.exports = function (str) { 6 | if (typeof str !== 'string') { 7 | throw new TypeError('Expected a string'); 8 | } 9 | 10 | return str.replace(matchOperatorsRe, '\\$&'); 11 | }; 12 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/escape-string-regexp/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; 4 | 5 | module.exports = function (str) { 6 | if (typeof str !== 'string') { 7 | throw new TypeError('Expected a string'); 8 | } 9 | 10 | return str.replace(matchOperatorsRe, '\\$&'); 11 | }; 12 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/interface/expect.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * chai 3 | * Copyright(c) 2011-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | module.exports = function (chai, util) { 8 | chai.expect = function (val, message) { 9 | return new chai.Assertion(val, message); 10 | }; 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/browser/escape-string-regexp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; 4 | 5 | module.exports = function (str) { 6 | if (typeof str !== 'string') { 7 | throw new TypeError('Expected a string'); 8 | } 9 | 10 | return str.replace(matchOperatorsRe, '\\$&'); 11 | }; 12 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/escape-string-regexp/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; 4 | 5 | module.exports = function (str) { 6 | if (typeof str !== 'string') { 7 | throw new TypeError('Expected a string'); 8 | } 9 | 10 | return str.replace(matchOperatorsRe, '\\$&'); 11 | }; 12 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/test/zz-cleanup.js: -------------------------------------------------------------------------------- 1 | // remove the fixtures 2 | var tap = require("tap") 3 | , rimraf = require("rimraf") 4 | , path = require("path") 5 | 6 | tap.test("cleanup fixtures", function (t) { 7 | rimraf(path.resolve(__dirname, "a"), function (er) { 8 | t.ifError(er, "removed") 9 | t.end() 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/test/zz-cleanup.js: -------------------------------------------------------------------------------- 1 | // remove the fixtures 2 | var tap = require("tap") 3 | , rimraf = require("rimraf") 4 | , path = require("path") 5 | 6 | tap.test("cleanup fixtures", function (t) { 7 | rimraf(path.resolve(__dirname, "a"), function (er) { 8 | t.ifError(er, "removed") 9 | t.end() 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /more_node_examples/test/test.js: -------------------------------------------------------------------------------- 1 | var expect = require("chai").expect; 2 | 3 | 4 | describe("Array", function () { 5 | 6 | describe("#indexOf", function () { 7 | 8 | it("should return -1 if missing", function () { 9 | 10 | var arr = ["jack", "jill", "jane"]; 11 | expect(arr.indexOf("john")).to.equal(-1); 12 | 13 | }) 14 | 15 | }) 16 | 17 | }); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/browser/tty.js: -------------------------------------------------------------------------------- 1 | exports.isatty = function(){ 2 | return true; 3 | }; 4 | 5 | exports.getWindowSize = function(){ 6 | if ('innerHeight' in global) { 7 | return [global.innerHeight, global.innerWidth]; 8 | } else { 9 | // In a Web Worker, the DOM Window is not available. 10 | return [640, 480]; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = parse([ '-b', '123' ], { boolean: 'b' }); 8 | t.deepEqual(argv, { b: true, _: ['123'] }); 9 | }); 10 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/browser/tty.js: -------------------------------------------------------------------------------- 1 | exports.isatty = function(){ 2 | return true; 3 | }; 4 | 5 | exports.getWindowSize = function(){ 6 | if ('innerHeight' in global) { 7 | return [global.innerHeight, global.innerWidth]; 8 | } else { 9 | // In a Web Worker, the DOM Window is not available. 10 | return [640, 480]; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /testing_example/sample_test.js: -------------------------------------------------------------------------------- 1 | var assert = require("assert"); 2 | var colors = require("colors"); 3 | 4 | assert.equal(1,1); 5 | try { 6 | assert.equal(1, 2, "1 should equal 1"); 7 | } catch (error) { 8 | console.log(error.message.red); 9 | } 10 | try { 11 | assert.equal(1, 3, "1 should equal 2"); 12 | } catch (error){ 13 | console.log(error.message.red); 14 | } -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = parse([ '-b', '123' ], { boolean: 'b' }); 8 | t.deepEqual(argv, { b: true, _: ['123'] }); 9 | }); 10 | -------------------------------------------------------------------------------- /more_node_examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "more_node_examples", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "dog.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "chai": "^3.2.0", 13 | "colors": "^1.1.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/self-closing.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - self closing tags 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | module.exports = [ 9 | 'meta' 10 | , 'img' 11 | , 'link' 12 | , 'input' 13 | , 'source' 14 | , 'area' 15 | , 'base' 16 | , 'col' 17 | , 'br' 18 | , 'hr' 19 | ]; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/self-closing.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - self closing tags 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | module.exports = [ 9 | 'meta' 10 | , 'img' 11 | , 'link' 12 | , 'input' 13 | , 'source' 14 | , 'area' 15 | , 'base' 16 | , 'col' 17 | , 'br' 18 | , 'hr' 19 | ]; -------------------------------------------------------------------------------- /more_node_examples/greeter.js: -------------------------------------------------------------------------------- 1 | var greet = function () { 2 | console.log("Hello world!"); 3 | } 4 | 5 | greet(); 6 | 7 | var adios = function ADIOS() { 8 | console.log("GOOOODBYE") 9 | }; 10 | 11 | // by default this is what is 12 | // exposed by node 13 | module.exports = {}; 14 | module.exports.greet = greet; 15 | module.exports.adios = adios; 16 | 17 | 18 | // module.exports = greet; -------------------------------------------------------------------------------- /node_examples/test/super_pet_test.js: -------------------------------------------------------------------------------- 1 | var expect = require("chai").expect; 2 | var SuperPet = require("../super_pet.js"); 3 | var Pet = require("../pet.js"); 4 | 5 | describe("SuperPet", function () { 6 | describe("Prototype", function () { 7 | it("should be an instance of a Pet", function () { 8 | expect(SuperPet.prototype).to.be.an.instanceof(Pet); 9 | }); 10 | }); 11 | }); -------------------------------------------------------------------------------- /examples/node_modules/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | return function (letter, i, exploded) { 5 | if(letter === " ") return letter; 6 | switch(i%3) { 7 | case 0: return colors.red(letter); 8 | case 1: return colors.white(letter) 9 | case 2: return colors.blue(letter) 10 | } 11 | } 12 | })(); -------------------------------------------------------------------------------- /examples_two/node_modules/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | return function (letter, i, exploded) { 5 | if(letter === " ") return letter; 6 | switch(i%3) { 7 | case 0: return colors.red(letter); 8 | case 1: return colors.white(letter) 9 | case 2: return colors.blue(letter) 10 | } 11 | } 12 | })(); -------------------------------------------------------------------------------- /examples_two/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "examples_two", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "colors": "^1.0.3" 13 | }, 14 | "devDependencies": { 15 | "chai": "^2.1.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /node_examples/node_modules/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | return function (letter, i, exploded) { 5 | if(letter === " ") return letter; 6 | switch(i%3) { 7 | case 0: return colors.red(letter); 8 | case 1: return colors.white(letter) 9 | case 2: return colors.blue(letter) 10 | } 11 | } 12 | })(); -------------------------------------------------------------------------------- /testing_example/node_modules/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | return function (letter, i, exploded) { 5 | if(letter === " ") return letter; 6 | switch(i%3) { 7 | case 0: return colors.red(letter); 8 | case 1: return colors.white(letter) 9 | case 2: return colors.blue(letter) 10 | } 11 | } 12 | })(); -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | return function (letter, i, exploded) { 5 | if(letter === " ") return letter; 6 | switch(i%3) { 7 | case 0: return colors.red(letter); 8 | case 1: return colors.white(letter) 9 | case 2: return colors.blue(letter) 10 | } 11 | } 12 | })(); -------------------------------------------------------------------------------- /examples/node_modules/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; 5 | return function(letter, i, exploded) { 6 | return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); 7 | }; 8 | })(); -------------------------------------------------------------------------------- /node_examples/super_pet.js: -------------------------------------------------------------------------------- 1 | var Pet = require("./pet.js"); 2 | 3 | function SuperPet(name, age, superPower) { 4 | this.name = name; 5 | this.age = age; 6 | this.superPower = superPower; 7 | } 8 | 9 | // inheritance 10 | SuperPet.prototype = new Pet(); 11 | 12 | SuperPet.prototype.crimeFight = function() { 13 | return "Fighting crime with " + this.superPower; 14 | }; 15 | 16 | module.exports = SuperPet; -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/assertion-error/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2013-06-08 3 | ================== 4 | 5 | * readme: change travis and component urls 6 | * refactor: [*] prepare for move to chaijs gh org 7 | 8 | 0.1.0 / 2013-04-07 9 | ================== 10 | 11 | * test: use vanilla test runner/assert 12 | * pgk: remove unused deps 13 | * lib: implement 14 | * "Initial commit" 15 | -------------------------------------------------------------------------------- /examples_two/node_modules/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; 5 | return function(letter, i, exploded) { 6 | return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); 7 | }; 8 | })(); -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/assertion-error/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2013-06-08 3 | ================== 4 | 5 | * readme: change travis and component urls 6 | * refactor: [*] prepare for move to chaijs gh org 7 | 8 | 0.1.0 / 2013-04-07 9 | ================== 10 | 11 | * test: use vanilla test runner/assert 12 | * pgk: remove unused deps 13 | * lib: implement 14 | * "Initial commit" 15 | -------------------------------------------------------------------------------- /node_examples/node_modules/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; 5 | return function(letter, i, exploded) { 6 | return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); 7 | }; 8 | })(); -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/assertion-error/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2013-06-08 3 | ================== 4 | 5 | * readme: change travis and component urls 6 | * refactor: [*] prepare for move to chaijs gh org 7 | 8 | 0.1.0 / 2013-04-07 9 | ================== 10 | 11 | * test: use vanilla test runner/assert 12 | * pgk: remove unused deps 13 | * lib: implement 14 | * "Initial commit" 15 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; 5 | return function(letter, i, exploded) { 6 | return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); 7 | }; 8 | })(); -------------------------------------------------------------------------------- /testing_example/node_modules/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; 5 | return function(letter, i, exploded) { 6 | return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); 7 | }; 8 | })(); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/bin/usage.txt: -------------------------------------------------------------------------------- 1 | usage: mkdirp [DIR1,DIR2..] {OPTIONS} 2 | 3 | Create each supplied directory including any necessary parent directories that 4 | don't yet exist. 5 | 6 | If the directory already exists, do nothing. 7 | 8 | OPTIONS are: 9 | 10 | -m, --mode If a directory needs to be created, set the mode as an octal 11 | permission string. 12 | 13 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/bin/usage.txt: -------------------------------------------------------------------------------- 1 | usage: mkdirp [DIR1,DIR2..] {OPTIONS} 2 | 3 | Create each supplied directory including any necessary parent directories that 4 | don't yet exist. 5 | 6 | If the directory already exists, do nothing. 7 | 8 | OPTIONS are: 9 | 10 | -m, --mode If a directory needs to be created, set the mode as an octal 11 | permission string. 12 | 13 | -------------------------------------------------------------------------------- /node_examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node_examples", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "greeting.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "colors": "^1.0.3" 13 | }, 14 | "devDependencies": { 15 | "chai": "^2.3.0", 16 | "mocha": "^2.2.4" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/node_modules/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV 5 | return function (letter, i, exploded) { 6 | if (letter === " ") { 7 | return letter; 8 | } else { 9 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 10 | } 11 | }; 12 | })(); 13 | 14 | -------------------------------------------------------------------------------- /examples_two/node_modules/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV 5 | return function (letter, i, exploded) { 6 | if (letter === " ") { 7 | return letter; 8 | } else { 9 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 10 | } 11 | }; 12 | })(); 13 | 14 | -------------------------------------------------------------------------------- /node_examples/node_modules/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV 5 | return function (letter, i, exploded) { 6 | if (letter === " ") { 7 | return letter; 8 | } else { 9 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 10 | } 11 | }; 12 | })(); 13 | 14 | -------------------------------------------------------------------------------- /testing_example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "testing_example", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha -R nyan test/", 8 | "example": "echo hello" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "colors": "^1.0.3" 14 | }, 15 | "devDependencies": { 16 | "chai": "^1.10.0", 17 | "mocha": "^2.0.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV 5 | return function (letter, i, exploded) { 6 | if (letter === " ") { 7 | return letter; 8 | } else { 9 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 10 | } 11 | }; 12 | })(); 13 | 14 | -------------------------------------------------------------------------------- /testing_example/node_modules/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function () { 4 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV 5 | return function (letter, i, exploded) { 6 | if (letter === " ") { 7 | return letter; 8 | } else { 9 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 10 | } 11 | }; 12 | })(); 13 | 14 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype 5 | // 6 | // If you don't wish to extend String.prototype you can do this instead and native String will not be touched 7 | // 8 | // var colors = require('colors/safe); 9 | // colors.red("foo") 10 | // 11 | // 12 | require('./extendStringPrototype')(); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.0.0", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "browser.js", 12 | "scripts": [ 13 | "browser.js", 14 | "debug.js" 15 | ], 16 | "dependencies": { 17 | "guille/ms.js": "0.6.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.0.0", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "browser.js", 12 | "scripts": [ 13 | "browser.js", 14 | "debug.js" 15 | ], 16 | "dependencies": { 17 | "guille/ms.js": "0.6.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/node_modules/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype 5 | // 6 | // If you don't wish to extend String.prototype you can do this instead and native String will not be touched 7 | // 8 | // var colors = require('colors/safe); 9 | // colors.red("foo") 10 | // 11 | // 12 | var extendStringPrototype = require('./extendStringPrototype')(); -------------------------------------------------------------------------------- /examples_two/node_modules/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype 5 | // 6 | // If you don't wish to extend String.prototype you can do this instead and native String will not be touched 7 | // 8 | // var colors = require('colors/safe); 9 | // colors.red("foo") 10 | // 11 | // 12 | var extendStringPrototype = require('./extendStringPrototype')(); -------------------------------------------------------------------------------- /node_examples/node_modules/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype 5 | // 6 | // If you don't wish to extend String.prototype you can do this instead and native String will not be touched 7 | // 8 | // var colors = require('colors/safe); 9 | // colors.red("foo") 10 | // 11 | // 12 | var extendStringPrototype = require('./extendStringPrototype')(); -------------------------------------------------------------------------------- /testing_example/node_modules/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype 5 | // 6 | // If you don't wish to extend String.prototype you can do this instead and native String will not be touched 7 | // 8 | // var colors = require('colors/safe); 9 | // colors.red("foo") 10 | // 11 | // 12 | var extendStringPrototype = require('./extendStringPrototype')(); -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/testing/index.jade: -------------------------------------------------------------------------------- 1 | 2 | tag = 'p' 3 | foo = 'bar' 4 | 5 | #{tag} value 6 | #{tag}(foo='bar') value 7 | #{foo ? 'a' : 'li'}(something) here 8 | 9 | mixin item(icon) 10 | li 11 | if attributes.href 12 | a(attributes) 13 | img.icon(src=icon) 14 | block 15 | else 16 | span(attributes) 17 | img.icon(src=icon) 18 | block 19 | 20 | ul 21 | +item('contact') Contact 22 | +item(href='/contact') Contact 23 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/testing/index.jade: -------------------------------------------------------------------------------- 1 | 2 | tag = 'p' 3 | foo = 'bar' 4 | 5 | #{tag} value 6 | #{tag}(foo='bar') value 7 | #{foo ? 'a' : 'li'}(something) here 8 | 9 | mixin item(icon) 10 | li 11 | if attributes.href 12 | a(attributes) 13 | img.icon(src=icon) 14 | block 15 | else 16 | span(attributes) 17 | img.icon(src=icon) 18 | block 19 | 20 | ul 21 | +item('contact') Contact 22 | +item(href='/contact') Contact 23 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/inline-tags.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - inline tags 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | module.exports = [ 9 | 'a' 10 | , 'abbr' 11 | , 'acronym' 12 | , 'b' 13 | , 'br' 14 | , 'code' 15 | , 'em' 16 | , 'font' 17 | , 'i' 18 | , 'img' 19 | , 'ins' 20 | , 'kbd' 21 | , 'map' 22 | , 'samp' 23 | , 'small' 24 | , 'span' 25 | , 'strong' 26 | , 'sub' 27 | , 'sup' 28 | ]; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/node.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Node 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Initialize a `Node`. 10 | * 11 | * @api public 12 | */ 13 | 14 | var Node = module.exports = function Node(){}; 15 | 16 | /** 17 | * Clone this node (return itself) 18 | * 19 | * @return {Node} 20 | * @api private 21 | */ 22 | 23 | Node.prototype.clone = function(){ 24 | return this; 25 | }; 26 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/inline-tags.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - inline tags 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | module.exports = [ 9 | 'a' 10 | , 'abbr' 11 | , 'acronym' 12 | , 'b' 13 | , 'br' 14 | , 'code' 15 | , 'em' 16 | , 'font' 17 | , 'i' 18 | , 'img' 19 | , 'ins' 20 | , 'kbd' 21 | , 'map' 22 | , 'samp' 23 | , 'small' 24 | , 'span' 25 | , 'strong' 26 | , 'sub' 27 | , 'sup' 28 | ]; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/reporters/templates/menu.jade: -------------------------------------------------------------------------------- 1 | #menu 2 | li 3 | a(href='#overview') overview 4 | for file in cov.files 5 | li 6 | span.cov(class=coverageClass(file.coverage)) #{file.coverage | 0} 7 | a(href='##{file.filename}') 8 | segments = file.filename.split('/') 9 | basename = segments.pop() 10 | if segments.length 11 | span.dirname= segments.join('/') + '/' 12 | span.basename= basename 13 | a#logo(href='http://mochajs.org/') m 14 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/node.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Node 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Initialize a `Node`. 10 | * 11 | * @api public 12 | */ 13 | 14 | var Node = module.exports = function Node(){}; 15 | 16 | /** 17 | * Clone this node (return itself) 18 | * 19 | * @return {Node} 20 | * @api private 21 | */ 22 | 23 | Node.prototype.clone = function(){ 24 | return this; 25 | }; 26 | -------------------------------------------------------------------------------- /testing_example/test/sample_test_2.js: -------------------------------------------------------------------------------- 1 | var assert = require("assert"); 2 | var expect = require("chai").expect; 3 | 4 | var myArr = [1,2,3]; 5 | 6 | describe("Array", function () { 7 | describe("the indexOf method", function (){ 8 | it("should return the index of a number in an arr", function (){ 9 | expect(2).to.equal(myArr.indexOf(3)); 10 | }); 11 | 12 | it("should return -1 if a number is not in the arr", function () { 13 | expect(-1).to.equal(myArr.indexOf(9)); 14 | }); 15 | }); 16 | }); -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/reporters/templates/menu.jade: -------------------------------------------------------------------------------- 1 | #menu 2 | li 3 | a(href='#overview') overview 4 | for file in cov.files 5 | li 6 | span.cov(class=coverageClass(file.coverage)) #{file.coverage | 0} 7 | a(href='##{file.filename}') 8 | segments = file.filename.split('/') 9 | basename = segments.pop() 10 | if segments.length 11 | span.dirname= segments.join('/') + '/' 12 | span.basename= basename 13 | a#logo(href='http://visionmedia.github.io/mocha/') m 14 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/utils/getActual.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getActual utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getActual(object, [actual]) 9 | * 10 | * Returns the `actual` value for an Assertion 11 | * 12 | * @param {Object} object (constructed Assertion) 13 | * @param {Arguments} chai.Assertion.prototype.assert arguments 14 | */ 15 | 16 | module.exports = function (obj, args) { 17 | return args.length > 4 ? args[4] : obj._obj; 18 | }; 19 | -------------------------------------------------------------------------------- /more_node_examples/dog.js: -------------------------------------------------------------------------------- 1 | var Pet = require("./pet"); 2 | 3 | function Dog(name, age, breed) { 4 | this.name = name; 5 | this.age = age; 6 | this.breed = breed; 7 | this.hungry = true; 8 | this.sleeping = false; 9 | this.needsWalk = true; 10 | 11 | } 12 | 13 | // Complete the inheritance 14 | Dog.prototype = new Pet() 15 | Dog.prototype.constructor = Dog; 16 | 17 | // And give a Dog a dogYears method 18 | Dog.prototype.dogYears = function () { 19 | console.log("BLAH") 20 | return this.age*7; 21 | } 22 | 23 | module.exports = Dog; -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/utils/getActual.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getActual utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getActual(object, [actual]) 9 | * 10 | * Returns the `actual` value for an Assertion 11 | * 12 | * @param {Object} object (constructed Assertion) 13 | * @param {Arguments} chai.Assertion.prototype.assert arguments 14 | */ 15 | 16 | module.exports = function (obj, args) { 17 | return args.length > 4 ? args[4] : obj._obj; 18 | }; 19 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/utils/getActual.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getActual utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getActual(object, [actual]) 9 | * 10 | * Returns the `actual` value for an Assertion 11 | * 12 | * @param {Object} object (constructed Assertion) 13 | * @param {Arguments} chai.Assertion.prototype.assert arguments 14 | */ 15 | 16 | module.exports = function (obj, args) { 17 | return args.length > 4 ? args[4] : obj._obj; 18 | }; 19 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/utils/getActual.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getActual utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getActual(object, [actual]) 9 | * 10 | * Returns the `actual` value for an Assertion 11 | * 12 | * @param {Object} object (constructed Assertion) 13 | * @param {Arguments} chai.Assertion.prototype.assert arguments 14 | */ 15 | 16 | module.exports = function (obj, args) { 17 | return args.length > 4 ? args[4] : obj._obj; 18 | }; 19 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/assertion-error/History.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2015-03-04 2 | ================== 3 | 4 | * Merge pull request #2 from simonzack/master 5 | * fixes `.stack` on firefox 6 | 7 | 1.0.0 / 2013-06-08 8 | ================== 9 | 10 | * readme: change travis and component urls 11 | * refactor: [*] prepare for move to chaijs gh org 12 | 13 | 0.1.0 / 2013-04-07 14 | ================== 15 | 16 | * test: use vanilla test runner/assert 17 | * pgk: remove unused deps 18 | * lib: implement 19 | * "Initial commit" 20 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/utils/getName.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getName utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getName(func) 9 | * 10 | * Gets the name of a function, in a cross-browser way. 11 | * 12 | * @param {Function} a function (usually a constructor) 13 | */ 14 | 15 | module.exports = function (func) { 16 | if (func.name) return func.name; 17 | 18 | var match = /^\s?function ([^(]*)\(/.exec(func); 19 | return match && match[1] ? match[1] : ""; 20 | }; 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/utils/getName.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getName utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getName(func) 9 | * 10 | * Gets the name of a function, in a cross-browser way. 11 | * 12 | * @param {Function} a function (usually a constructor) 13 | */ 14 | 15 | module.exports = function (func) { 16 | if (func.name) return func.name; 17 | 18 | var match = /^\s?function ([^(]*)\(/.exec(func); 19 | return match && match[1] ? match[1] : ""; 20 | }; 21 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/utils/getName.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getName utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getName(func) 9 | * 10 | * Gets the name of a function, in a cross-browser way. 11 | * 12 | * @param {Function} a function (usually a constructor) 13 | */ 14 | 15 | module.exports = function (func) { 16 | if (func.name) return func.name; 17 | 18 | var match = /^\s?function ([^(]*)\(/.exec(func); 19 | return match && match[1] ? match[1] : ""; 20 | }; 21 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/utils/getName.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getName utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * # getName(func) 9 | * 10 | * Gets the name of a function, in a cross-browser way. 11 | * 12 | * @param {Function} a function (usually a constructor) 13 | */ 14 | 15 | module.exports = function (func) { 16 | if (func.name) return func.name; 17 | 18 | var match = /^\s?function ([^(]*)\(/.exec(func); 19 | return match && match[1] ? match[1] : ""; 20 | }; 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js: -------------------------------------------------------------------------------- 1 | var Minimatch = require("../minimatch.js").Minimatch 2 | var tap = require("tap") 3 | tap.test("cache test", function (t) { 4 | var mm1 = new Minimatch("a?b") 5 | var mm2 = new Minimatch("a?b") 6 | t.equal(mm1, mm2, "should get the same object") 7 | // the lru should drop it after 100 entries 8 | for (var i = 0; i < 100; i ++) { 9 | new Minimatch("a"+i) 10 | } 11 | mm2 = new Minimatch("a?b") 12 | t.notEqual(mm1, mm2, "cache should have dropped") 13 | t.end() 14 | }) 15 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js: -------------------------------------------------------------------------------- 1 | var Minimatch = require("../minimatch.js").Minimatch 2 | var tap = require("tap") 3 | tap.test("cache test", function (t) { 4 | var mm1 = new Minimatch("a?b") 5 | var mm2 = new Minimatch("a?b") 6 | t.equal(mm1, mm2, "should get the same object") 7 | // the lru should drop it after 100 entries 8 | for (var i = 0; i < 100; i ++) { 9 | new Minimatch("a"+i) 10 | } 11 | mm2 = new Minimatch("a?b") 12 | t.notEqual(mm1, mm2, "cache should have dropped") 13 | t.end() 14 | }) 15 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.1 / 2013-10-10 3 | ================== 4 | 5 | * Merge pull request #2 from strongloop/fix-browserify 6 | * index,test: support browserify 7 | 8 | 0.1.0 / 2013-08-14 9 | ================== 10 | 11 | * readme: document all methods 12 | * readme: add badges 13 | * library: [test] ensure test runs 14 | * travis: change script to run coveralls reportwq 15 | * tests: add tests 16 | * lib: add type detect lib 17 | * pkg: prepare for coverage based tests 18 | * "Initial commit" 19 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.1 / 2013-10-10 3 | ================== 4 | 5 | * Merge pull request #2 from strongloop/fix-browserify 6 | * index,test: support browserify 7 | 8 | 0.1.0 / 2013-08-14 9 | ================== 10 | 11 | * readme: document all methods 12 | * readme: add badges 13 | * library: [test] ensure test runs 14 | * travis: change script to run coveralls reportwq 15 | * tests: add tests 16 | * lib: add type detect lib 17 | * pkg: prepare for coverage based tests 18 | * "Initial commit" 19 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej: -------------------------------------------------------------------------------- 1 | --- examples/pow.js 2 | +++ examples/pow.js 3 | @@ -1,6 +1,15 @@ 4 | -var mkdirp = require('mkdirp').mkdirp; 5 | +var mkdirp = require('../').mkdirp, 6 | + mkdirpSync = require('../').mkdirpSync; 7 | 8 | mkdirp('/tmp/foo/bar/baz', 0755, function (err) { 9 | if (err) console.error(err) 10 | else console.log('pow!') 11 | }); 12 | + 13 | +try { 14 | + mkdirpSync('/tmp/bar/foo/baz', 0755); 15 | + console.log('double pow!'); 16 | +} 17 | +catch (ex) { 18 | + console.log(ex); 19 | +} -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej: -------------------------------------------------------------------------------- 1 | --- examples/pow.js 2 | +++ examples/pow.js 3 | @@ -1,6 +1,15 @@ 4 | -var mkdirp = require('mkdirp').mkdirp; 5 | +var mkdirp = require('../').mkdirp, 6 | + mkdirpSync = require('../').mkdirpSync; 7 | 8 | mkdirp('/tmp/foo/bar/baz', 0755, function (err) { 9 | if (err) console.error(err) 10 | else console.log('pow!') 11 | }); 12 | + 13 | +try { 14 | + mkdirpSync('/tmp/bar/foo/baz', 0755); 15 | + console.log('double pow!'); 16 | +} 17 | +catch (ex) { 18 | + console.log(ex); 19 | +} -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | basePath: '' 4 | , frameworks: [ 'mocha' ] 5 | , files: [ 6 | 'build/build.js' 7 | , 'test/bootstrap/karma.js' 8 | , 'test/*.js' 9 | ] 10 | , exclude: [] 11 | , reporters: [ 'progress' ] 12 | , port: 9876 13 | , colors: true 14 | , logLevel: config.LOG_INFO 15 | , autoWatch: true 16 | , browsers: [ 'PhantomJS' ] 17 | , captureTimeout: 60000 18 | , singleRun: false 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.1 / 2013-10-10 3 | ================== 4 | 5 | * Merge pull request #2 from strongloop/fix-browserify 6 | * index,test: support browserify 7 | 8 | 0.1.0 / 2013-08-14 9 | ================== 10 | 11 | * readme: document all methods 12 | * readme: add badges 13 | * library: [test] ensure test runs 14 | * travis: change script to run coveralls reportwq 15 | * tests: add tests 16 | * lib: add type detect lib 17 | * pkg: prepare for coverage based tests 18 | * "Initial commit" 19 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | basePath: '' 4 | , frameworks: [ 'mocha' ] 5 | , files: [ 6 | 'build/build.js' 7 | , 'test/bootstrap/karma.js' 8 | , 'test/*.js' 9 | ] 10 | , exclude: [] 11 | , reporters: [ 'progress' ] 12 | , port: 9876 13 | , colors: true 14 | , logLevel: config.LOG_INFO 15 | , autoWatch: true 16 | , browsers: [ 'PhantomJS' ] 17 | , captureTimeout: 60000 18 | , singleRun: false 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/readdir-sort.js: -------------------------------------------------------------------------------- 1 | var test = require("tap").test 2 | var fs = require("fs") 3 | 4 | var readdir = fs.readdir 5 | fs.readdir = function(path, cb) { 6 | process.nextTick(function() { 7 | cb(null, ["b", "z", "a"]) 8 | }) 9 | } 10 | 11 | var g = require("../") 12 | 13 | test("readdir reorder", function (t) { 14 | g.readdir("whatevers", function (er, files) { 15 | if (er) 16 | throw er 17 | console.error(files) 18 | t.same(files, [ "a", "b", "z" ]) 19 | t.end() 20 | }) 21 | }) 22 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.1 / 2013-10-10 3 | ================== 4 | 5 | * Merge pull request #2 from strongloop/fix-browserify 6 | * index,test: support browserify 7 | 8 | 0.1.0 / 2013-08-14 9 | ================== 10 | 11 | * readme: document all methods 12 | * readme: add badges 13 | * library: [test] ensure test runs 14 | * travis: change script to run coveralls reportwq 15 | * tests: add tests 16 | * lib: add type detect lib 17 | * pkg: prepare for coverage based tests 18 | * "Initial commit" 19 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/readdir-sort.js: -------------------------------------------------------------------------------- 1 | var test = require("tap").test 2 | var fs = require("fs") 3 | 4 | var readdir = fs.readdir 5 | fs.readdir = function(path, cb) { 6 | process.nextTick(function() { 7 | cb(null, ["b", "z", "a"]) 8 | }) 9 | } 10 | 11 | var g = require("../") 12 | 13 | test("readdir reorder", function (t) { 14 | g.readdir("whatevers", function (er, files) { 15 | if (er) 16 | throw er 17 | console.error(files) 18 | t.same(files, [ "a", "b", "z" ]) 19 | t.end() 20 | }) 21 | }) 22 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | basePath: '' 4 | , frameworks: [ 'mocha' ] 5 | , files: [ 6 | 'build/build.js' 7 | , 'test/bootstrap/karma.js' 8 | , 'test/*.js' 9 | ] 10 | , exclude: [] 11 | , reporters: [ 'progress' ] 12 | , port: 9876 13 | , colors: true 14 | , logLevel: config.LOG_INFO 15 | , autoWatch: true 16 | , browsers: [ 'PhantomJS' ] 17 | , captureTimeout: 60000 18 | , singleRun: false 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dotted.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('dotted alias', function (t) { 5 | var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 6 | t.equal(argv.a.b, 22); 7 | t.equal(argv.aa.bb, 22); 8 | t.end(); 9 | }); 10 | 11 | test('dotted default', function (t) { 12 | var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 13 | t.equal(argv.a.b, 11); 14 | t.equal(argv.aa.bb, 11); 15 | t.end(); 16 | }); 17 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | basePath: '' 4 | , frameworks: [ 'mocha' ] 5 | , files: [ 6 | 'build/build.js' 7 | , 'test/bootstrap/karma.js' 8 | , 'test/*.js' 9 | ] 10 | , exclude: [] 11 | , reporters: [ 'progress' ] 12 | , port: 9876 13 | , colors: true 14 | , logLevel: config.LOG_INFO 15 | , autoWatch: true 16 | , browsers: [ 'PhantomJS' ] 17 | , captureTimeout: 60000 18 | , singleRun: false 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dotted.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('dotted alias', function (t) { 5 | var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 6 | t.equal(argv.a.b, 22); 7 | t.equal(argv.aa.bb, 22); 8 | t.end(); 9 | }); 10 | 11 | test('dotted default', function (t) { 12 | var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 13 | t.equal(argv.a.b, 11); 14 | t.equal(argv.aa.bb, 11); 15 | t.end(); 16 | }); 17 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mocha 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/root.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('root', function (t) { 7 | // '/' on unix, 'c:/' on windows. 8 | var file = path.resolve('/'); 9 | 10 | mkdirp(file, 0755, function (err) { 11 | if (err) throw err 12 | fs.stat(file, function (er, stat) { 13 | if (er) throw er 14 | t.ok(stat.isDirectory(), 'target is a directory'); 15 | t.end(); 16 | }) 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mocha 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/root.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('root', function (t) { 7 | // '/' on unix, 'c:/' on windows. 8 | var file = path.resolve('/'); 9 | 10 | mkdirp(file, 0755, function (err) { 11 | if (err) throw err 12 | fs.stat(file, function (er, stat) { 13 | if (er) throw er 14 | t.ok(stat.isDirectory(), 'target is a directory'); 15 | t.end(); 16 | }) 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chai", 3 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", 4 | "license": "MIT", 5 | "keywords": [ 6 | "test", 7 | "assertion", 8 | "assert", 9 | "testing", 10 | "chai" 11 | ], 12 | "main": "chai.js", 13 | "ignore": [ 14 | "build", 15 | "components", 16 | "lib", 17 | "node_modules", 18 | "support", 19 | "test", 20 | "index.js", 21 | "Makefile", 22 | ".*" 23 | ], 24 | "dependencies": {}, 25 | "devDependencies": {} 26 | } 27 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Doctype 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Doctype` with the given `val`. 16 | * 17 | * @param {String} val 18 | * @api public 19 | */ 20 | 21 | var Doctype = module.exports = function Doctype(val) { 22 | this.val = val; 23 | }; 24 | 25 | /** 26 | * Inherit from `Node`. 27 | */ 28 | 29 | Doctype.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Doctype 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Doctype` with the given `val`. 16 | * 17 | * @param {String} val 18 | * @api public 19 | */ 20 | 21 | var Doctype = module.exports = function Doctype(val) { 22 | this.val = val; 23 | }; 24 | 25 | /** 26 | * Inherit from `Node`. 27 | */ 28 | 29 | Doctype.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /examples_two/node_modules/chai/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chai", 3 | "version": "2.1.1", 4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", 5 | "license": "MIT", 6 | "keywords": [ 7 | "test", 8 | "assertion", 9 | "assert", 10 | "testing", 11 | "chai" 12 | ], 13 | "main": "chai.js", 14 | "ignore": [ 15 | "build", 16 | "components", 17 | "lib", 18 | "node_modules", 19 | "support", 20 | "test", 21 | "index.js", 22 | "Makefile", 23 | ".*" 24 | ], 25 | "dependencies": {}, 26 | "devDependencies": {} 27 | } 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chai", 3 | "version": "2.3.0", 4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", 5 | "license": "MIT", 6 | "keywords": [ 7 | "test", 8 | "assertion", 9 | "assert", 10 | "testing", 11 | "chai" 12 | ], 13 | "main": "chai.js", 14 | "ignore": [ 15 | "build", 16 | "components", 17 | "lib", 18 | "node_modules", 19 | "support", 20 | "test", 21 | "index.js", 22 | "Makefile", 23 | ".*" 24 | ], 25 | "dependencies": {}, 26 | "devDependencies": {} 27 | } 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/default_bool.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('boolean default true', function (t) { 5 | var argv = parse([], { 6 | boolean: 'sometrue', 7 | default: { sometrue: true } 8 | }); 9 | t.equal(argv.sometrue, true); 10 | t.end(); 11 | }); 12 | 13 | test('boolean default false', function (t) { 14 | var argv = parse([], { 15 | boolean: 'somefalse', 16 | default: { somefalse: false } 17 | }); 18 | t.equal(argv.somefalse, false); 19 | t.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/default_bool.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('boolean default true', function (t) { 5 | var argv = parse([], { 6 | boolean: 'sometrue', 7 | default: { sometrue: true } 8 | }); 9 | t.equal(argv.sometrue, true); 10 | t.end(); 11 | }); 12 | 13 | test('boolean default false', function (t) { 14 | var argv = parse([], { 15 | boolean: 'somefalse', 16 | default: { somefalse: false } 17 | }); 18 | t.equal(argv.somefalse, false); 19 | t.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Runnable = require('./runnable'); 6 | 7 | /** 8 | * Expose `Test`. 9 | */ 10 | 11 | module.exports = Test; 12 | 13 | /** 14 | * Initialize a new `Test` with the given `title` and callback `fn`. 15 | * 16 | * @param {String} title 17 | * @param {Function} fn 18 | * @api private 19 | */ 20 | 21 | function Test(title, fn) { 22 | Runnable.call(this, title, fn); 23 | this.pending = !fn; 24 | this.type = 'test'; 25 | } 26 | 27 | /** 28 | * Inherit from `Runnable.prototype`. 29 | */ 30 | 31 | Test.prototype.__proto__ = Runnable.prototype; 32 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/test/globstar-match.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../glob.js").Glob 2 | var test = require('tap').test 3 | 4 | test('globstar should not have dupe matches', function(t) { 5 | var pattern = 'a/**/[gh]' 6 | var g = new Glob(pattern, { cwd: __dirname }) 7 | var matches = [] 8 | g.on('match', function(m) { 9 | console.error('match %j', m) 10 | matches.push(m) 11 | }) 12 | g.on('end', function(set) { 13 | console.error('set', set) 14 | matches = matches.sort() 15 | set = set.sort() 16 | t.same(matches, set, 'should have same set of matches') 17 | t.end() 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Runnable = require('./runnable'); 6 | 7 | /** 8 | * Expose `Test`. 9 | */ 10 | 11 | module.exports = Test; 12 | 13 | /** 14 | * Initialize a new `Test` with the given `title` and callback `fn`. 15 | * 16 | * @param {String} title 17 | * @param {Function} fn 18 | * @api private 19 | */ 20 | 21 | function Test(title, fn) { 22 | Runnable.call(this, title, fn); 23 | this.pending = !fn; 24 | this.type = 'test'; 25 | } 26 | 27 | /** 28 | * Inherit from `Runnable.prototype`. 29 | */ 30 | 31 | Test.prototype.__proto__ = Runnable.prototype; 32 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/test/globstar-match.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../glob.js").Glob 2 | var test = require('tap').test 3 | 4 | test('globstar should not have dupe matches', function(t) { 5 | var pattern = 'a/**/[gh]' 6 | var g = new Glob(pattern, { cwd: __dirname }) 7 | var matches = [] 8 | g.on('match', function(m) { 9 | console.error('match %j', m) 10 | matches.push(m) 11 | }) 12 | g.on('end', function(set) { 13 | console.error('set', set) 14 | matches = matches.sort() 15 | set = set.sort() 16 | t.same(matches, set, 'should have same set of matches') 17 | t.end() 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/utils/test.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - test utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /*! 8 | * Module dependancies 9 | */ 10 | 11 | var flag = require('./flag'); 12 | 13 | /** 14 | * # test(object, expression) 15 | * 16 | * Test and object for expression. 17 | * 18 | * @param {Object} object (constructed Assertion) 19 | * @param {Arguments} chai.Assertion.prototype.assert arguments 20 | */ 21 | 22 | module.exports = function (obj, args) { 23 | var negate = flag(obj, 'negate') 24 | , expr = args[0]; 25 | return negate ? !expr : expr; 26 | }; 27 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/utils/test.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - test utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /*! 8 | * Module dependancies 9 | */ 10 | 11 | var flag = require('./flag'); 12 | 13 | /** 14 | * # test(object, expression) 15 | * 16 | * Test and object for expression. 17 | * 18 | * @param {Object} object (constructed Assertion) 19 | * @param {Arguments} chai.Assertion.prototype.assert arguments 20 | */ 21 | 22 | module.exports = function (obj, args) { 23 | var negate = flag(obj, 'negate') 24 | , expr = args[0]; 25 | return negate ? !expr : expr; 26 | }; 27 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/utils/test.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - test utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /*! 8 | * Module dependancies 9 | */ 10 | 11 | var flag = require('./flag'); 12 | 13 | /** 14 | * # test(object, expression) 15 | * 16 | * Test and object for expression. 17 | * 18 | * @param {Object} object (constructed Assertion) 19 | * @param {Arguments} chai.Assertion.prototype.assert arguments 20 | */ 21 | 22 | module.exports = function (obj, args) { 23 | var negate = flag(obj, 'negate') 24 | , expr = args[0]; 25 | return negate ? !expr : expr; 26 | }; 27 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/utils/test.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - test utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /*! 8 | * Module dependancies 9 | */ 10 | 11 | var flag = require('./flag'); 12 | 13 | /** 14 | * # test(object, expression) 15 | * 16 | * Test and object for expression. 17 | * 18 | * @param {Object} object (constructed Assertion) 19 | * @param {Arguments} chai.Assertion.prototype.assert arguments 20 | */ 21 | 22 | module.exports = function (obj, args) { 23 | var negate = flag(obj, 'negate') 24 | , expr = args[0]; 25 | return negate ? !expr : expr; 26 | }; 27 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Authors, sorted by whether or not they are me 2 | Isaac Z. Schlueter 3 | Brian Cottingham 4 | Carlos Brito Lage 5 | Jesse Dailey 6 | Kevin O'Hara 7 | Marco Rogers 8 | Mark Cavage 9 | Marko Mikulicic 10 | Nathan Rajlich 11 | Satheesh Natesan 12 | Trent Mick 13 | ashleybrener 14 | n4kz 15 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Authors, sorted by whether or not they are me 2 | Isaac Z. Schlueter 3 | Brian Cottingham 4 | Carlos Brito Lage 5 | Jesse Dailey 6 | Kevin O'Hara 7 | Marco Rogers 8 | Mark Cavage 9 | Marko Mikulicic 10 | Nathan Rajlich 11 | Satheesh Natesan 12 | Trent Mick 13 | ashleybrener 14 | n4kz 15 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chai" 3 | , "version": "1.10.0" 4 | , "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic." 5 | , "license": "MIT" 6 | , "keywords": [ 7 | "test" 8 | , "assertion" 9 | , "assert" 10 | , "testing" 11 | , "chai" 12 | ] 13 | , "main": "chai.js" 14 | , "ignore": [ 15 | "build" 16 | , "components" 17 | , "lib" 18 | , "node_modules" 19 | , "support" 20 | , "test" 21 | , "index.js" 22 | , "Makefile" 23 | , ".*" 24 | ] 25 | , "dependencies": {} 26 | , "devDependencies": {} 27 | } 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/supports-color/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | var pkg = require('./package.json'); 4 | var supportsColor = require('./'); 5 | var argv = process.argv.slice(2); 6 | 7 | function help() { 8 | console.log([ 9 | '', 10 | ' ' + pkg.description, 11 | '', 12 | ' Usage', 13 | ' supports-color', 14 | '', 15 | ' Exits with code 0 if color is supported and 1 if not' 16 | ].join('\n')); 17 | } 18 | 19 | if (argv.indexOf('--help') !== -1) { 20 | help(); 21 | return; 22 | } 23 | 24 | if (argv.indexOf('--version') !== -1) { 25 | console.log(pkg.version); 26 | return; 27 | } 28 | 29 | process.exit(supportsColor ? 0 : 1); 30 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/utils/getEnumerableProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getEnumerableProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getEnumerableProperties(object) 9 | * 10 | * This allows the retrieval of enumerable property names of an object, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getEnumerableProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getEnumerableProperties(object) { 20 | var result = []; 21 | for (var name in object) { 22 | result.push(name); 23 | } 24 | return result; 25 | }; 26 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/utils/getEnumerableProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getEnumerableProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getEnumerableProperties(object) 9 | * 10 | * This allows the retrieval of enumerable property names of an object, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getEnumerableProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getEnumerableProperties(object) { 20 | var result = []; 21 | for (var name in object) { 22 | result.push(name); 23 | } 24 | return result; 25 | }; 26 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/utils/getEnumerableProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getEnumerableProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getEnumerableProperties(object) 9 | * 10 | * This allows the retrieval of enumerable property names of an object, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getEnumerableProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getEnumerableProperties(object) { 20 | var result = []; 21 | for (var name in object) { 22 | result.push(name); 23 | } 24 | return result; 25 | }; 26 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/utils/getEnumerableProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getEnumerableProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getEnumerableProperties(object) 9 | * 10 | * This allows the retrieval of enumerable property names of an object, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getEnumerableProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getEnumerableProperties(object) { 20 | var result = []; 21 | for (var name in object) { 22 | result.push(name); 23 | } 24 | return result; 25 | }; 26 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | exports.Node = require('./node'); 9 | exports.Tag = require('./tag'); 10 | exports.Code = require('./code'); 11 | exports.Each = require('./each'); 12 | exports.Case = require('./case'); 13 | exports.Text = require('./text'); 14 | exports.Block = require('./block'); 15 | exports.Mixin = require('./mixin'); 16 | exports.Filter = require('./filter'); 17 | exports.Comment = require('./comment'); 18 | exports.Literal = require('./literal'); 19 | exports.BlockComment = require('./block-comment'); 20 | exports.Doctype = require('./doctype'); 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/literal.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Literal 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Literal` node with the given `str. 16 | * 17 | * @param {String} str 18 | * @api public 19 | */ 20 | 21 | var Literal = module.exports = function Literal(str) { 22 | this.str = str 23 | .replace(/\\/g, "\\\\") 24 | .replace(/\n|\r\n/g, "\\n") 25 | .replace(/'/g, "\\'"); 26 | }; 27 | 28 | /** 29 | * Inherit from `Node`. 30 | */ 31 | 32 | Literal.prototype.__proto__ = Node.prototype; 33 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/literal.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Literal 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Literal` node with the given `str. 16 | * 17 | * @param {String} str 18 | * @api public 19 | */ 20 | 21 | var Literal = module.exports = function Literal(str) { 22 | this.str = str 23 | .replace(/\\/g, "\\\\") 24 | .replace(/\n|\r\n/g, "\\n") 25 | .replace(/'/g, "\\'"); 26 | }; 27 | 28 | /** 29 | * Inherit from `Node`. 30 | */ 31 | 32 | Literal.prototype.__proto__ = Node.prototype; 33 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | exports.Node = require('./node'); 9 | exports.Tag = require('./tag'); 10 | exports.Code = require('./code'); 11 | exports.Each = require('./each'); 12 | exports.Case = require('./case'); 13 | exports.Text = require('./text'); 14 | exports.Block = require('./block'); 15 | exports.Mixin = require('./mixin'); 16 | exports.Filter = require('./filter'); 17 | exports.Comment = require('./comment'); 18 | exports.Literal = require('./literal'); 19 | exports.BlockComment = require('./block-comment'); 20 | exports.Doctype = require('./doctype'); 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/reporters/index.js: -------------------------------------------------------------------------------- 1 | exports.Base = require('./base'); 2 | exports.Dot = require('./dot'); 3 | exports.Doc = require('./doc'); 4 | exports.TAP = require('./tap'); 5 | exports.JSON = require('./json'); 6 | exports.HTML = require('./html'); 7 | exports.List = require('./list'); 8 | exports.Min = require('./min'); 9 | exports.Spec = require('./spec'); 10 | exports.Nyan = require('./nyan'); 11 | exports.XUnit = require('./xunit'); 12 | exports.Markdown = require('./markdown'); 13 | exports.Progress = require('./progress'); 14 | exports.Landing = require('./landing'); 15 | exports.JSONCov = require('./json-cov'); 16 | exports.HTMLCov = require('./html-cov'); 17 | exports.JSONStream = require('./json-stream'); 18 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/escape-string-regexp/readme.md: -------------------------------------------------------------------------------- 1 | # escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) 2 | 3 | > Escape RegExp special characters 4 | 5 | 6 | ## Install 7 | 8 | ```sh 9 | $ npm install --save escape-string-regexp 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | var escapeStringRegexp = require('escape-string-regexp'); 17 | 18 | var escapedString = escapeStringRegexp('how much $ for a unicorn?'); 19 | //=> how much \$ for a unicorn\? 20 | 21 | new RegExp(escapedString); 22 | ``` 23 | 24 | 25 | ## License 26 | 27 | MIT © [Sindre Sorhus](http://sindresorhus.com) 28 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/escape-string-regexp/readme.md: -------------------------------------------------------------------------------- 1 | # escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) 2 | 3 | > Escape RegExp special characters 4 | 5 | 6 | ## Install 7 | 8 | ```sh 9 | $ npm install --save escape-string-regexp 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | var escapeStringRegexp = require('escape-string-regexp'); 17 | 18 | var escapedString = escapeStringRegexp('how much $ for a unicorn?'); 19 | //=> how much \$ for a unicorn\? 20 | 21 | new RegExp(escapedString); 22 | ``` 23 | 24 | 25 | ## License 26 | 27 | MIT © [Sindre Sorhus](http://sindresorhus.com) 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/text.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Text 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Text` node with optional `line`. 16 | * 17 | * @param {String} line 18 | * @api public 19 | */ 20 | 21 | var Text = module.exports = function Text(line) { 22 | this.val = ''; 23 | if ('string' == typeof line) this.val = line; 24 | }; 25 | 26 | /** 27 | * Inherit from `Node`. 28 | */ 29 | 30 | Text.prototype.__proto__ = Node.prototype; 31 | 32 | /** 33 | * Flag as text. 34 | */ 35 | 36 | Text.prototype.isText = true; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/reporters/index.js: -------------------------------------------------------------------------------- 1 | exports.Base = require('./base'); 2 | exports.Dot = require('./dot'); 3 | exports.Doc = require('./doc'); 4 | exports.TAP = require('./tap'); 5 | exports.JSON = require('./json'); 6 | exports.HTML = require('./html'); 7 | exports.List = require('./list'); 8 | exports.Min = require('./min'); 9 | exports.Spec = require('./spec'); 10 | exports.Nyan = require('./nyan'); 11 | exports.XUnit = require('./xunit'); 12 | exports.Markdown = require('./markdown'); 13 | exports.Progress = require('./progress'); 14 | exports.Landing = require('./landing'); 15 | exports.JSONCov = require('./json-cov'); 16 | exports.HTMLCov = require('./html-cov'); 17 | exports.JSONStream = require('./json-stream'); 18 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/text.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Text 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Text` node with optional `line`. 16 | * 17 | * @param {String} line 18 | * @api public 19 | */ 20 | 21 | var Text = module.exports = function Text(line) { 22 | this.val = ''; 23 | if ('string' == typeof line) this.val = line; 24 | }; 25 | 26 | /** 27 | * Inherit from `Node`. 28 | */ 29 | 30 | Text.prototype.__proto__ = Node.prototype; 31 | 32 | /** 33 | * Flag as text. 34 | */ 35 | 36 | Text.prototype.isText = true; -------------------------------------------------------------------------------- /examples_two/node_modules/chai/node_modules/deep-eql/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.3 / 2013-10-10 3 | ================== 4 | 5 | * pkg: update type-detect version 6 | * index,test: conditional require in test bootstrap 7 | 8 | 0.1.2 / 2013-09-18 9 | ================== 10 | 11 | * bug: [fix] misnamed variable from code migration (reference error) 12 | 13 | 0.1.1 / 2013-09-18 14 | ================== 15 | 16 | * bug: [fix] last key of deep object ignored 17 | 18 | 0.1.0 / 2013-09-18 19 | ================== 20 | 21 | * tests: add iterable 22 | * docs: readme 23 | * makefile: [ci] update cov handling 24 | * testing: [env] use karma for phantom 25 | * add tests (uncompleted) 26 | * add library 27 | * add dependencies 28 | * "Initial commit" 29 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/node_modules/deep-eql/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.3 / 2013-10-10 3 | ================== 4 | 5 | * pkg: update type-detect version 6 | * index,test: conditional require in test bootstrap 7 | 8 | 0.1.2 / 2013-09-18 9 | ================== 10 | 11 | * bug: [fix] misnamed variable from code migration (reference error) 12 | 13 | 0.1.1 / 2013-09-18 14 | ================== 15 | 16 | * bug: [fix] last key of deep object ignored 17 | 18 | 0.1.0 / 2013-09-18 19 | ================== 20 | 21 | * tests: add iterable 22 | * docs: readme 23 | * makefile: [ci] update cov handling 24 | * testing: [env] use karma for phantom 25 | * add tests (uncompleted) 26 | * add library 27 | * add dependencies 28 | * "Initial commit" 29 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/node_modules/deep-eql/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.3 / 2013-10-10 3 | ================== 4 | 5 | * pkg: update type-detect version 6 | * index,test: conditional require in test bootstrap 7 | 8 | 0.1.2 / 2013-09-18 9 | ================== 10 | 11 | * bug: [fix] misnamed variable from code migration (reference error) 12 | 13 | 0.1.1 / 2013-09-18 14 | ================== 15 | 16 | * bug: [fix] last key of deep object ignored 17 | 18 | 0.1.0 / 2013-09-18 19 | ================== 20 | 21 | * tests: add iterable 22 | * docs: readme 23 | * makefile: [ci] update cov handling 24 | * testing: [env] use karma for phantom 25 | * add tests (uncompleted) 26 | * add library 27 | * add dependencies 28 | * "Initial commit" 29 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/node_modules/deep-eql/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.3 / 2013-10-10 3 | ================== 4 | 5 | * pkg: update type-detect version 6 | * index,test: conditional require in test bootstrap 7 | 8 | 0.1.2 / 2013-09-18 9 | ================== 10 | 11 | * bug: [fix] misnamed variable from code migration (reference error) 12 | 13 | 0.1.1 / 2013-09-18 14 | ================== 15 | 16 | * bug: [fix] last key of deep object ignored 17 | 18 | 0.1.0 / 2013-09-18 19 | ================== 20 | 21 | * tests: add iterable 22 | * docs: readme 23 | * makefile: [ci] update cov handling 24 | * testing: [env] use karma for phantom 25 | * add tests (uncompleted) 26 | * add library 27 | * add dependencies 28 | * "Initial commit" 29 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/comment.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Comment 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Comment` with the given `val`, optionally `buffer`, 16 | * otherwise the comment may render in the output. 17 | * 18 | * @param {String} val 19 | * @param {Boolean} buffer 20 | * @api public 21 | */ 22 | 23 | var Comment = module.exports = function Comment(val, buffer) { 24 | this.val = val; 25 | this.buffer = buffer; 26 | }; 27 | 28 | /** 29 | * Inherit from `Node`. 30 | */ 31 | 32 | Comment.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/comment.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Comment 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Comment` with the given `val`, optionally `buffer`, 16 | * otherwise the comment may render in the output. 17 | * 18 | * @param {String} val 19 | * @param {Boolean} buffer 20 | * @api public 21 | */ 22 | 23 | var Comment = module.exports = function Comment(val, buffer) { 24 | this.val = val; 25 | this.buffer = buffer; 26 | }; 27 | 28 | /** 29 | * Inherit from `Node`. 30 | */ 31 | 32 | Comment.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /more_node_examples/pet.js: -------------------------------------------------------------------------------- 1 | function Pet(name, age) { 2 | 3 | this.name = name || "Fido"; 4 | this.age = age; 5 | this.sleeping = false; 6 | this.hungry = true; 7 | this.tricks = []; 8 | } 9 | 10 | // sleep, eat 11 | Pet.prototype.sleep = function () { 12 | this.sleeping = true; 13 | console.log("zzzz-ZZZZZ-zzzz"); 14 | } 15 | 16 | Pet.prototype.eat = function () { 17 | this.hungry = false; 18 | console.log("num-num-nom"); 19 | } 20 | 21 | Pet.prototype.perform = function () { 22 | var numOfTricks = this.tricks.length; 23 | var randTrick = Math.floor(numOfTricks*Math.random()); 24 | return this.tricks[randTrick]; 25 | } 26 | 27 | Pet.prototype.learn = function (trick) { 28 | 29 | } 30 | module.exports = Pet; 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - BlockComment 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `BlockComment` with the given `block`. 16 | * 17 | * @param {String} val 18 | * @param {Block} block 19 | * @param {Boolean} buffer 20 | * @api public 21 | */ 22 | 23 | var BlockComment = module.exports = function BlockComment(val, block, buffer) { 24 | this.block = block; 25 | this.val = val; 26 | this.buffer = buffer; 27 | }; 28 | 29 | /** 30 | * Inherit from `Node`. 31 | */ 32 | 33 | BlockComment.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/each.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Each 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize an `Each` node, representing iteration 16 | * 17 | * @param {String} obj 18 | * @param {String} val 19 | * @param {String} key 20 | * @param {Block} block 21 | * @api public 22 | */ 23 | 24 | var Each = module.exports = function Each(obj, val, key, block) { 25 | this.obj = obj; 26 | this.val = val; 27 | this.key = key; 28 | this.block = block; 29 | }; 30 | 31 | /** 32 | * Inherit from `Node`. 33 | */ 34 | 35 | Each.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /examples_two/test/app_test.js: -------------------------------------------------------------------------------- 1 | console.log("TESTING!") 2 | 3 | // var assert = require("assert"); 4 | var expect = require("chai").expect; 5 | 6 | describe("Array", function () { 7 | describe("#indexOf", function () { 8 | it("should return -1 when a vaule is not present", function () { 9 | expect(-1).to.equal([1,2,3].indexOf(5)); 10 | }); 11 | it("should return the index of the value in the array", function (){ 12 | expect(1).to.equal([4,5,6].indexOf(5)) 13 | }); 14 | }); 15 | 16 | describe("#map", function () { 17 | it("should return an array of resulting values", function () { 18 | var results = [1,2,3].map(function (val) { 19 | return val*2; 20 | }); 21 | expect([2,4,6]).to.eql(results); 22 | }); 23 | }); 24 | }); -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - BlockComment 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `BlockComment` with the given `block`. 16 | * 17 | * @param {String} val 18 | * @param {Block} block 19 | * @param {Boolean} buffer 20 | * @api public 21 | */ 22 | 23 | var BlockComment = module.exports = function BlockComment(val, block, buffer) { 24 | this.block = block; 25 | this.val = val; 26 | this.buffer = buffer; 27 | }; 28 | 29 | /** 30 | * Inherit from `Node`. 31 | */ 32 | 33 | BlockComment.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/each.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Each 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize an `Each` node, representing iteration 16 | * 17 | * @param {String} obj 18 | * @param {String} val 19 | * @param {String} key 20 | * @param {Block} block 21 | * @api public 22 | */ 23 | 24 | var Each = module.exports = function Each(obj, val, key, block) { 25 | this.obj = obj; 26 | this.val = val; 27 | this.key = key; 28 | this.block = block; 29 | }; 30 | 31 | /** 32 | * Inherit from `Node`. 33 | */ 34 | 35 | Each.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /examples_two/node_modules/chai/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | frameworks: [ 'mocha' ] 4 | , files: [ 5 | 'build/build.js' 6 | , 'test/bootstrap/karma.js' 7 | , 'test/*.js' 8 | ] 9 | , reporters: [ 'progress' ] 10 | , colors: true 11 | , logLevel: config.LOG_INFO 12 | , autoWatch: false 13 | , browsers: [ 'PhantomJS' ] 14 | , browserDisconnectTimeout: 10000 15 | , browserDisconnectTolerance: 2 16 | , browserNoActivityTimeout: 20000 17 | , singleRun: true 18 | }); 19 | 20 | switch (process.env.CHAI_TEST_ENV) { 21 | case 'sauce': 22 | require('./karma.sauce')(config); 23 | break; 24 | default: 25 | // ... 26 | break; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | frameworks: [ 'mocha' ] 4 | , files: [ 5 | 'chai.js' 6 | , 'test/bootstrap/karma.js' 7 | , 'test/*.js' 8 | ] 9 | , reporters: [ 'progress' ] 10 | , colors: true 11 | , logLevel: config.LOG_INFO 12 | , autoWatch: false 13 | , browsers: [ 'PhantomJS' ] 14 | , browserDisconnectTimeout: 10000 15 | , browserDisconnectTolerance: 2 16 | , browserNoActivityTimeout: 20000 17 | , singleRun: true 18 | }); 19 | 20 | switch (process.env.CHAI_TEST_ENV) { 21 | case 'sauce': 22 | require('./karma.sauce')(config); 23 | break; 24 | default: 25 | // ... 26 | break; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | frameworks: [ 'mocha' ] 4 | , files: [ 5 | 'build/build.js' 6 | , 'test/bootstrap/karma.js' 7 | , 'test/*.js' 8 | ] 9 | , reporters: [ 'progress' ] 10 | , colors: true 11 | , logLevel: config.LOG_INFO 12 | , autoWatch: false 13 | , browsers: [ 'PhantomJS' ] 14 | , browserDisconnectTimeout: 10000 15 | , browserDisconnectTolerance: 2 16 | , browserNoActivityTimeout: 20000 17 | , singleRun: true 18 | }); 19 | 20 | switch (process.env.CHAI_TEST_ENV) { 21 | case 'sauce': 22 | require('./karma.sauce')(config); 23 | break; 24 | default: 25 | // ... 26 | break; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | frameworks: [ 'mocha' ] 4 | , files: [ 5 | 'build/build.js' 6 | , 'test/bootstrap/karma.js' 7 | , 'test/*.js' 8 | ] 9 | , reporters: [ 'progress' ] 10 | , colors: true 11 | , logLevel: config.LOG_INFO 12 | , autoWatch: false 13 | , browsers: [ 'PhantomJS' ] 14 | , browserDisconnectTimeout: 10000 15 | , browserDisconnectTolerance: 2 16 | , browserNoActivityTimeout: 20000 17 | , singleRun: true 18 | }); 19 | 20 | switch (process.env.CHAI_TEST_ENV) { 21 | case 'sauce': 22 | require('./karma.sauce')(config); 23 | break; 24 | default: 25 | // ... 26 | break; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Mixin 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Attrs = require('./attrs'); 13 | 14 | /** 15 | * Initialize a new `Mixin` with `name` and `block`. 16 | * 17 | * @param {String} name 18 | * @param {String} args 19 | * @param {Block} block 20 | * @api public 21 | */ 22 | 23 | var Mixin = module.exports = function Mixin(name, args, block, call){ 24 | this.name = name; 25 | this.args = args; 26 | this.block = block; 27 | this.attrs = []; 28 | this.call = call; 29 | }; 30 | 31 | /** 32 | * Inherit from `Attrs`. 33 | */ 34 | 35 | Mixin.prototype.__proto__ = Attrs.prototype; 36 | 37 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Mixin 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Attrs = require('./attrs'); 13 | 14 | /** 15 | * Initialize a new `Mixin` with `name` and `block`. 16 | * 17 | * @param {String} name 18 | * @param {String} args 19 | * @param {Block} block 20 | * @api public 21 | */ 22 | 23 | var Mixin = module.exports = function Mixin(name, args, block, call){ 24 | this.name = name; 25 | this.args = args; 26 | this.block = block; 27 | this.attrs = []; 28 | this.call = call; 29 | }; 30 | 31 | /** 32 | * Inherit from `Attrs`. 33 | */ 34 | 35 | Mixin.prototype.__proto__ = Attrs.prototype; 36 | 37 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/reporters/min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Base = require('./base'); 6 | 7 | /** 8 | * Expose `Min`. 9 | */ 10 | 11 | exports = module.exports = Min; 12 | 13 | /** 14 | * Initialize a new `Min` minimal test reporter (best used with --watch). 15 | * 16 | * @param {Runner} runner 17 | * @api public 18 | */ 19 | 20 | function Min(runner) { 21 | Base.call(this, runner); 22 | 23 | runner.on('start', function(){ 24 | // clear screen 25 | process.stdout.write('\u001b[2J'); 26 | // set cursor position 27 | process.stdout.write('\u001b[1;3H'); 28 | }); 29 | 30 | runner.on('end', this.epilogue.bind(this)); 31 | } 32 | 33 | /** 34 | * Inherit from `Base.prototype`. 35 | */ 36 | 37 | Min.prototype.__proto__ = Base.prototype; 38 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/reporters/min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Base = require('./base'); 6 | 7 | /** 8 | * Expose `Min`. 9 | */ 10 | 11 | exports = module.exports = Min; 12 | 13 | /** 14 | * Initialize a new `Min` minimal test reporter (best used with --watch). 15 | * 16 | * @param {Runner} runner 17 | * @api public 18 | */ 19 | 20 | function Min(runner) { 21 | Base.call(this, runner); 22 | 23 | runner.on('start', function(){ 24 | // clear screen 25 | process.stdout.write('\u001b[2J'); 26 | // set cursor position 27 | process.stdout.write('\u001b[1;3H'); 28 | }); 29 | 30 | runner.on('end', this.epilogue.bind(this)); 31 | } 32 | 33 | /** 34 | * Inherit from `Base.prototype`. 35 | */ 36 | 37 | Min.prototype.__proto__ = Base.prototype; 38 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/reporters/templates/script.html: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/reporters/templates/script.html: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/bin/options.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Dependencies. 3 | */ 4 | 5 | var fs = require('fs'); 6 | 7 | /** 8 | * Export `getOptions`. 9 | */ 10 | 11 | module.exports = getOptions; 12 | 13 | /** 14 | * Get options. 15 | */ 16 | 17 | function getOptions() { 18 | var optsPath = process.argv.indexOf('--opts') !== -1 19 | ? process.argv[process.argv.indexOf('--opts') + 1] 20 | : 'test/mocha.opts'; 21 | 22 | try { 23 | var opts = fs.readFileSync(optsPath, 'utf8') 24 | .trim() 25 | .split(/\s+/) 26 | .filter(function(value) { 27 | return value ? true : false; 28 | }); 29 | 30 | process.argv = process.argv 31 | .slice(0, 2) 32 | .concat(opts.concat(process.argv.slice(2))); 33 | } catch (err) { 34 | // ignore 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://api.travis-ci.org/mochajs/mocha.svg?branch=master)](http://travis-ci.org/mochajs/mocha) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mochajs/mocha?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 2 | 3 | [![Mocha test framework](http://f.cl.ly/items/3l1k0n2A1U3M1I1L210p/Screen%20Shot%202012-02-24%20at%202.21.43%20PM.png)](http://mochajs.org) 4 | 5 | Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://mochajs.org). 6 | 7 | ## Links 8 | 9 | - [Google Group](http://groups.google.com/group/mochajs) 10 | - [Wiki](https://github.com/mochajs/mocha/wiki) 11 | - Mocha [Extensions and reporters](https://github.com/mochajs/mocha/wiki) 12 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/code.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Code 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Code` node with the given code `val`. 16 | * Code may also be optionally buffered and escaped. 17 | * 18 | * @param {String} val 19 | * @param {Boolean} buffer 20 | * @param {Boolean} escape 21 | * @api public 22 | */ 23 | 24 | var Code = module.exports = function Code(val, buffer, escape) { 25 | this.val = val; 26 | this.buffer = buffer; 27 | this.escape = escape; 28 | if (val.match(/^ *else/)) this.debug = false; 29 | }; 30 | 31 | /** 32 | * Inherit from `Node`. 33 | */ 34 | 35 | Code.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/code.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Code 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a `Code` node with the given code `val`. 16 | * Code may also be optionally buffered and escaped. 17 | * 18 | * @param {String} val 19 | * @param {Boolean} buffer 20 | * @param {Boolean} escape 21 | * @api public 22 | */ 23 | 24 | var Code = module.exports = function Code(val, buffer, escape) { 25 | this.val = val; 26 | this.buffer = buffer; 27 | this.escape = escape; 28 | if (val.match(/^ *else/)) this.debug = false; 29 | }; 30 | 31 | /** 32 | * Inherit from `Node`. 33 | */ 34 | 35 | Code.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/filter.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Filter 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node') 13 | , Block = require('./block'); 14 | 15 | /** 16 | * Initialize a `Filter` node with the given 17 | * filter `name` and `block`. 18 | * 19 | * @param {String} name 20 | * @param {Block|Node} block 21 | * @api public 22 | */ 23 | 24 | var Filter = module.exports = function Filter(name, block, attrs) { 25 | this.name = name; 26 | this.block = block; 27 | this.attrs = attrs; 28 | this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); 29 | }; 30 | 31 | /** 32 | * Inherit from `Node`. 33 | */ 34 | 35 | Filter.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/filter.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Filter 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node') 13 | , Block = require('./block'); 14 | 15 | /** 16 | * Initialize a `Filter` node with the given 17 | * filter `name` and `block`. 18 | * 19 | * @param {String} name 20 | * @param {Block|Node} block 21 | * @api public 22 | */ 23 | 24 | var Filter = module.exports = function Filter(name, block, attrs) { 25 | this.name = name; 26 | this.block = block; 27 | this.attrs = attrs; 28 | this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); 29 | }; 30 | 31 | /** 32 | * Inherit from `Node`. 33 | */ 34 | 35 | Filter.prototype.__proto__ = Node.prototype; -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 3 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 4 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 5 | 6 | # BIN directory 7 | BIN := $(THIS_DIR)/node_modules/.bin 8 | 9 | # applications 10 | NODE ?= $(shell which node) 11 | NPM ?= $(NODE) $(shell which npm) 12 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 13 | 14 | all: dist/debug.js 15 | 16 | install: node_modules 17 | 18 | clean: 19 | @rm -rf node_modules dist 20 | 21 | dist: 22 | @mkdir -p $@ 23 | 24 | dist/debug.js: node_modules browser.js debug.js dist 25 | @$(BROWSERIFY) \ 26 | --standalone debug \ 27 | . > $@ 28 | 29 | node_modules: package.json 30 | @NODE_ENV= $(NPM) install 31 | @touch node_modules 32 | 33 | .PHONY: all install clean 34 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js: -------------------------------------------------------------------------------- 1 | var tap = require("tap") 2 | , minimatch = require("../") 3 | 4 | tap.test("brace expansion", function (t) { 5 | // [ pattern, [expanded] ] 6 | ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" 7 | , [ "abxy" 8 | , "abxz" 9 | , "acdxy" 10 | , "acdxz" 11 | , "acexy" 12 | , "acexz" 13 | , "afhxy" 14 | , "afhxz" 15 | , "aghxy" 16 | , "aghxz" ] ] 17 | , [ "a{1..5}b" 18 | , [ "a1b" 19 | , "a2b" 20 | , "a3b" 21 | , "a4b" 22 | , "a5b" ] ] 23 | , [ "a{b}c", ["a{b}c"] ] 24 | ].forEach(function (tc) { 25 | var p = tc[0] 26 | , expect = tc[1] 27 | t.equivalent(minimatch.braceExpand(p), expect, p) 28 | }) 29 | console.error("ending") 30 | t.end() 31 | }) 32 | 33 | 34 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 3 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 4 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 5 | 6 | # BIN directory 7 | BIN := $(THIS_DIR)/node_modules/.bin 8 | 9 | # applications 10 | NODE ?= $(shell which node) 11 | NPM ?= $(NODE) $(shell which npm) 12 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 13 | 14 | all: dist/debug.js 15 | 16 | install: node_modules 17 | 18 | clean: 19 | @rm -rf node_modules dist 20 | 21 | dist: 22 | @mkdir -p $@ 23 | 24 | dist/debug.js: node_modules browser.js debug.js dist 25 | @$(BROWSERIFY) \ 26 | --standalone debug \ 27 | . > $@ 28 | 29 | node_modules: package.json 30 | @NODE_ENV= $(NPM) install 31 | @touch node_modules 32 | 33 | .PHONY: all install clean 34 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var sigmund = require('../sigmund.js') 3 | 4 | 5 | // occasionally there are duplicates 6 | // that's an acceptable edge-case. JSON.stringify and util.inspect 7 | // have some collision potential as well, though less, and collision 8 | // detection is expensive. 9 | var hash = '{abc/def/g{0h1i2{jkl' 10 | var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} 11 | var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} 12 | 13 | var obj3 = JSON.parse(JSON.stringify(obj1)) 14 | obj3.c = /def/ 15 | obj3.g[2].cycle = obj3 16 | var cycleHash = '{abc/def/g{0h1i2{jklcycle' 17 | 18 | test('basic', function (t) { 19 | t.equal(sigmund(obj1), hash) 20 | t.equal(sigmund(obj2), hash) 21 | t.equal(sigmund(obj3), cycleHash) 22 | t.end() 23 | }) 24 | 25 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js: -------------------------------------------------------------------------------- 1 | var tap = require("tap") 2 | , minimatch = require("../") 3 | 4 | tap.test("brace expansion", function (t) { 5 | // [ pattern, [expanded] ] 6 | ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" 7 | , [ "abxy" 8 | , "abxz" 9 | , "acdxy" 10 | , "acdxz" 11 | , "acexy" 12 | , "acexz" 13 | , "afhxy" 14 | , "afhxz" 15 | , "aghxy" 16 | , "aghxz" ] ] 17 | , [ "a{1..5}b" 18 | , [ "a1b" 19 | , "a2b" 20 | , "a3b" 21 | , "a4b" 22 | , "a5b" ] ] 23 | , [ "a{b}c", ["a{b}c"] ] 24 | ].forEach(function (tc) { 25 | var p = tc[0] 26 | , expect = tc[1] 27 | t.equivalent(minimatch.braceExpand(p), expect, p) 28 | }) 29 | console.error("ending") 30 | t.end() 31 | }) 32 | 33 | 34 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var sigmund = require('../sigmund.js') 3 | 4 | 5 | // occasionally there are duplicates 6 | // that's an acceptable edge-case. JSON.stringify and util.inspect 7 | // have some collision potential as well, though less, and collision 8 | // detection is expensive. 9 | var hash = '{abc/def/g{0h1i2{jkl' 10 | var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} 11 | var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} 12 | 13 | var obj3 = JSON.parse(JSON.stringify(obj1)) 14 | obj3.c = /def/ 15 | obj3.g[2].cycle = obj3 16 | var cycleHash = '{abc/def/g{0h1i2{jklcycle' 17 | 18 | test('basic', function (t) { 19 | t.equal(sigmund(obj1), hash) 20 | t.equal(sigmund(obj2), hash) 21 | t.equal(sigmund(obj3), cycleHash) 22 | t.end() 23 | }) 24 | 25 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/lib/nodes/case.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Case 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a new `Case` with `expr`. 16 | * 17 | * @param {String} expr 18 | * @api public 19 | */ 20 | 21 | var Case = exports = module.exports = function Case(expr, block){ 22 | this.expr = expr; 23 | this.block = block; 24 | }; 25 | 26 | /** 27 | * Inherit from `Node`. 28 | */ 29 | 30 | Case.prototype.__proto__ = Node.prototype; 31 | 32 | var When = exports.When = function When(expr, block){ 33 | this.expr = expr; 34 | this.block = block; 35 | this.debug = false; 36 | }; 37 | 38 | /** 39 | * Inherit from `Node`. 40 | */ 41 | 42 | When.prototype.__proto__ = Node.prototype; 43 | 44 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); 7 | t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); 8 | t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); 9 | t.deepEqual( 10 | parse([ '-b', '-' ], { boolean: 'b' }), 11 | { b: true, _: [ '-' ] } 12 | ); 13 | t.deepEqual( 14 | parse([ '-s', '-' ], { string: 's' }), 15 | { s: '-', _: [] } 16 | ); 17 | }); 18 | 19 | test('-a -- b', function (t) { 20 | t.plan(3); 21 | t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 22 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 23 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 24 | }); 25 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/lib/nodes/case.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Jade - nodes - Case 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var Node = require('./node'); 13 | 14 | /** 15 | * Initialize a new `Case` with `expr`. 16 | * 17 | * @param {String} expr 18 | * @api public 19 | */ 20 | 21 | var Case = exports = module.exports = function Case(expr, block){ 22 | this.expr = expr; 23 | this.block = block; 24 | }; 25 | 26 | /** 27 | * Inherit from `Node`. 28 | */ 29 | 30 | Case.prototype.__proto__ = Node.prototype; 31 | 32 | var When = exports.When = function When(expr, block){ 33 | this.expr = expr; 34 | this.block = block; 35 | this.debug = false; 36 | }; 37 | 38 | /** 39 | * Inherit from `Node`. 40 | */ 41 | 42 | When.prototype.__proto__ = Node.prototype; 43 | 44 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); 7 | t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); 8 | t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); 9 | t.deepEqual( 10 | parse([ '-b', '-' ], { boolean: 'b' }), 11 | { b: true, _: [ '-' ] } 12 | ); 13 | t.deepEqual( 14 | parse([ '-s', '-' ], { string: 's' }), 15 | { s: '-', _: [] } 16 | ); 17 | }); 18 | 19 | test('-a -- b', function (t) { 20 | t.plan(3); 21 | t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 22 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 23 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 24 | }); 25 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/bin/cmd.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mkdirp = require('../'); 4 | var minimist = require('minimist'); 5 | var fs = require('fs'); 6 | 7 | var argv = minimist(process.argv.slice(2), { 8 | alias: { m: 'mode', h: 'help' }, 9 | string: [ 'mode' ] 10 | }); 11 | if (argv.help) { 12 | fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); 13 | return; 14 | } 15 | 16 | var paths = argv._.slice(); 17 | var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; 18 | 19 | (function next () { 20 | if (paths.length === 0) return; 21 | var p = paths.shift(); 22 | 23 | if (mode === undefined) mkdirp(p, cb) 24 | else mkdirp(p, mode, cb) 25 | 26 | function cb (err) { 27 | if (err) { 28 | console.error(err.message); 29 | process.exit(1); 30 | } 31 | else next(); 32 | } 33 | })(); 34 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/bin/cmd.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mkdirp = require('../'); 4 | var minimist = require('minimist'); 5 | var fs = require('fs'); 6 | 7 | var argv = minimist(process.argv.slice(2), { 8 | alias: { m: 'mode', h: 'help' }, 9 | string: [ 'mode' ] 10 | }); 11 | if (argv.help) { 12 | fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); 13 | return; 14 | } 15 | 16 | var paths = argv._.slice(); 17 | var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; 18 | 19 | (function next () { 20 | if (paths.length === 0) return; 21 | var p = paths.shift(); 22 | 23 | if (mode === undefined) mkdirp(p, cb) 24 | else mkdirp(p, mode, cb) 25 | 26 | function cb (err) { 27 | if (err) { 28 | console.error(err.message); 29 | process.exit(1); 30 | } 31 | else next(); 32 | } 33 | })(); 34 | -------------------------------------------------------------------------------- /testing_example/test/custom_constructor.js: -------------------------------------------------------------------------------- 1 | var expect = require("chai").expect; 2 | 3 | // write some code for our construtor 4 | function Pet(name, age) { 5 | this.name = name; 6 | this.age = age; 7 | this.fetch = function (item){ 8 | console.log(this.name, "FETCHED:", item); 9 | } 10 | } 11 | // then write some tests 12 | 13 | describe("Pet", function(){ 14 | describe("properties", function () { 15 | var newPet = new Pet("killer", 2); 16 | it("has a name", function () { 17 | expect(newPet.name).to.equal("killer"); 18 | }); 19 | it("has an age", function () { 20 | expect(newPet.age).to.equal(2); 21 | }); 22 | }); 23 | describe("#fetch", function () { 24 | var newPet = new Pet("killer", 2); 25 | it("should be able to fetch", function () { 26 | expect(newPet.fetch).to.not.equal(undefined); 27 | expect(typeof newPet.fetch).to.equal("function"); 28 | }) 29 | }); 30 | }); -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/interface/expect.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * chai 3 | * Copyright(c) 2011-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | module.exports = function (chai, util) { 8 | chai.expect = function (val, message) { 9 | return new chai.Assertion(val, message); 10 | }; 11 | 12 | /** 13 | * ### .fail(actual, expected, [message], [operator]) 14 | * 15 | * Throw a failure. 16 | * 17 | * @name fail 18 | * @param {Mixed} actual 19 | * @param {Mixed} expected 20 | * @param {String} message 21 | * @param {String} operator 22 | * @api public 23 | */ 24 | 25 | chai.expect.fail = function (actual, expected, message, operator) { 26 | message = message || 'expect.fail()'; 27 | throw new chai.AssertionError(message, { 28 | actual: actual 29 | , expected: expected 30 | , operator: operator 31 | }, chai.expect.fail); 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/interface/expect.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * chai 3 | * Copyright(c) 2011-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | module.exports = function (chai, util) { 8 | chai.expect = function (val, message) { 9 | return new chai.Assertion(val, message); 10 | }; 11 | 12 | /** 13 | * ### .fail(actual, expected, [message], [operator]) 14 | * 15 | * Throw a failure. 16 | * 17 | * @name fail 18 | * @param {Mixed} actual 19 | * @param {Mixed} expected 20 | * @param {String} message 21 | * @param {String} operator 22 | * @api public 23 | */ 24 | 25 | chai.expect.fail = function (actual, expected, message, operator) { 26 | message = message || 'expect.fail()'; 27 | throw new chai.AssertionError(message, { 28 | actual: actual 29 | , expected: expected 30 | , operator: operator 31 | }, chai.expect.fail); 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/supports-color/readme.md: -------------------------------------------------------------------------------- 1 | # supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color) 2 | 3 | > Detect whether a terminal supports color 4 | 5 | 6 | ## Install 7 | 8 | ```sh 9 | $ npm install --save supports-color 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | var supportsColor = require('supports-color'); 17 | 18 | if (supportsColor) { 19 | console.log('Terminal supports color'); 20 | } 21 | ``` 22 | 23 | It obeys the `--color` and `--no-color` CLI flags. 24 | 25 | 26 | ## CLI 27 | 28 | ```sh 29 | $ npm install --global supports-color 30 | ``` 31 | 32 | ``` 33 | $ supports-color --help 34 | 35 | Usage 36 | supports-color 37 | 38 | Exits with code 0 if color is supported and 1 if not 39 | ``` 40 | 41 | 42 | ## License 43 | 44 | MIT © [Sindre Sorhus](http://sindresorhus.com) 45 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/interface/expect.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * chai 3 | * Copyright(c) 2011-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | module.exports = function (chai, util) { 8 | chai.expect = function (val, message) { 9 | return new chai.Assertion(val, message); 10 | }; 11 | 12 | /** 13 | * ### .fail(actual, expected, [message], [operator]) 14 | * 15 | * Throw a failure. 16 | * 17 | * @name fail 18 | * @param {Mixed} actual 19 | * @param {Mixed} expected 20 | * @param {String} message 21 | * @param {String} operator 22 | * @api public 23 | */ 24 | 25 | chai.expect.fail = function (actual, expected, message, operator) { 26 | message = message || 'expect.fail()'; 27 | throw new chai.AssertionError(message, { 28 | actual: actual 29 | , expected: expected 30 | , operator: operator 31 | }, chai.expect.fail); 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/glob/test/stat.js: -------------------------------------------------------------------------------- 1 | var glob = require('../') 2 | var test = require('tap').test 3 | var path = require('path') 4 | 5 | test('stat all the things', function(t) { 6 | var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname }) 7 | var matches = [] 8 | g.on('match', function(m) { 9 | matches.push(m) 10 | }) 11 | var stats = [] 12 | g.on('stat', function(m) { 13 | stats.push(m) 14 | }) 15 | g.on('end', function(eof) { 16 | stats = stats.sort() 17 | matches = matches.sort() 18 | eof = eof.sort() 19 | t.same(stats, matches) 20 | t.same(eof, matches) 21 | var cache = Object.keys(this.statCache) 22 | t.same(cache.map(function (f) { 23 | return path.relative(__dirname, f) 24 | }).sort(), matches) 25 | 26 | cache.forEach(function(c) { 27 | t.equal(typeof this.statCache[c], 'object') 28 | }, this) 29 | 30 | t.end() 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/glob/test/stat.js: -------------------------------------------------------------------------------- 1 | var glob = require('../') 2 | var test = require('tap').test 3 | var path = require('path') 4 | 5 | test('stat all the things', function(t) { 6 | var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname }) 7 | var matches = [] 8 | g.on('match', function(m) { 9 | matches.push(m) 10 | }) 11 | var stats = [] 12 | g.on('stat', function(m) { 13 | stats.push(m) 14 | }) 15 | g.on('end', function(eof) { 16 | stats = stats.sort() 17 | matches = matches.sort() 18 | eof = eof.sort() 19 | t.same(stats, matches) 20 | t.same(eof, matches) 21 | var cache = Object.keys(this.statCache) 22 | t.same(cache.map(function (f) { 23 | return path.relative(__dirname, f) 24 | }).sort(), matches) 25 | 26 | cache.forEach(function(c) { 27 | t.equal(typeof this.statCache[c], 'object') 28 | }, this) 29 | 30 | t.end() 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/lib/hook.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Runnable = require('./runnable'); 6 | 7 | /** 8 | * Expose `Hook`. 9 | */ 10 | 11 | module.exports = Hook; 12 | 13 | /** 14 | * Initialize a new `Hook` with the given `title` and callback `fn`. 15 | * 16 | * @param {String} title 17 | * @param {Function} fn 18 | * @api private 19 | */ 20 | 21 | function Hook(title, fn) { 22 | Runnable.call(this, title, fn); 23 | this.type = 'hook'; 24 | } 25 | 26 | /** 27 | * Inherit from `Runnable.prototype`. 28 | */ 29 | 30 | Hook.prototype.__proto__ = Runnable.prototype; 31 | 32 | /** 33 | * Get or set the test `err`. 34 | * 35 | * @param {Error} err 36 | * @return {Error} 37 | * @api public 38 | */ 39 | 40 | Hook.prototype.error = function(err){ 41 | if (0 == arguments.length) { 42 | var err = this._error; 43 | this._error = null; 44 | return err; 45 | } 46 | 47 | this._error = err; 48 | }; 49 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | 6 | test('opts.fs sync', function (t) { 7 | t.plan(4); 8 | 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/beep/boop/' + [x,y,z].join('/'); 14 | var xfs = mockfs.fs(); 15 | 16 | mkdirp.sync(file, { fs: xfs, mode: 0755 }); 17 | xfs.exists(file, function (ex) { 18 | t.ok(ex, 'created file'); 19 | xfs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/utils/flag.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - flag utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### flag(object, key, [value]) 9 | * 10 | * Get or set a flag value on an object. If a 11 | * value is provided it will be set, else it will 12 | * return the currently set value or `undefined` if 13 | * the value is not set. 14 | * 15 | * utils.flag(this, 'foo', 'bar'); // setter 16 | * utils.flag(this, 'foo'); // getter, returns `bar` 17 | * 18 | * @param {Object} object constructed Assertion 19 | * @param {String} key 20 | * @param {Mixed} value (optional) 21 | * @name flag 22 | * @api private 23 | */ 24 | 25 | module.exports = function (obj, key, value) { 26 | var flags = obj.__flags || (obj.__flags = Object.create(null)); 27 | if (arguments.length === 3) { 28 | flags[key] = value; 29 | } else { 30 | return flags[key]; 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/utils/flag.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - flag utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### flag(object, key, [value]) 9 | * 10 | * Get or set a flag value on an object. If a 11 | * value is provided it will be set, else it will 12 | * return the currently set value or `undefined` if 13 | * the value is not set. 14 | * 15 | * utils.flag(this, 'foo', 'bar'); // setter 16 | * utils.flag(this, 'foo'); // getter, returns `bar` 17 | * 18 | * @param {Object} object constructed Assertion 19 | * @param {String} key 20 | * @param {Mixed} value (optional) 21 | * @name flag 22 | * @api private 23 | */ 24 | 25 | module.exports = function (obj, key, value) { 26 | var flags = obj.__flags || (obj.__flags = Object.create(null)); 27 | if (arguments.length === 3) { 28 | flags[key] = value; 29 | } else { 30 | return flags[key]; 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/lib/hook.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Runnable = require('./runnable'); 6 | 7 | /** 8 | * Expose `Hook`. 9 | */ 10 | 11 | module.exports = Hook; 12 | 13 | /** 14 | * Initialize a new `Hook` with the given `title` and callback `fn`. 15 | * 16 | * @param {String} title 17 | * @param {Function} fn 18 | * @api private 19 | */ 20 | 21 | function Hook(title, fn) { 22 | Runnable.call(this, title, fn); 23 | this.type = 'hook'; 24 | } 25 | 26 | /** 27 | * Inherit from `Runnable.prototype`. 28 | */ 29 | 30 | Hook.prototype.__proto__ = Runnable.prototype; 31 | 32 | /** 33 | * Get or set the test `err`. 34 | * 35 | * @param {Error} err 36 | * @return {Error} 37 | * @api public 38 | */ 39 | 40 | Hook.prototype.error = function(err){ 41 | if (0 == arguments.length) { 42 | var err = this._error; 43 | this._error = null; 44 | return err; 45 | } 46 | 47 | this._error = err; 48 | }; 49 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | 6 | test('opts.fs sync', function (t) { 7 | t.plan(4); 8 | 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/beep/boop/' + [x,y,z].join('/'); 14 | var xfs = mockfs.fs(); 15 | 16 | mkdirp.sync(file, { fs: xfs, mode: 0755 }); 17 | xfs.exists(file, function (ex) { 18 | t.ok(ex, 'created file'); 19 | xfs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/utils/flag.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - flag utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### flag(object, key, [value]) 9 | * 10 | * Get or set a flag value on an object. If a 11 | * value is provided it will be set, else it will 12 | * return the currently set value or `undefined` if 13 | * the value is not set. 14 | * 15 | * utils.flag(this, 'foo', 'bar'); // setter 16 | * utils.flag(this, 'foo'); // getter, returns `bar` 17 | * 18 | * @param {Object} object constructed Assertion 19 | * @param {String} key 20 | * @param {Mixed} value (optional) 21 | * @name flag 22 | * @api private 23 | */ 24 | 25 | module.exports = function (obj, key, value) { 26 | var flags = obj.__flags || (obj.__flags = Object.create(null)); 27 | if (arguments.length === 3) { 28 | flags[key] = value; 29 | } else { 30 | return flags[key]; 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/utils/flag.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - flag utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### flag(object ,key, [value]) 9 | * 10 | * Get or set a flag value on an object. If a 11 | * value is provided it will be set, else it will 12 | * return the currently set value or `undefined` if 13 | * the value is not set. 14 | * 15 | * utils.flag(this, 'foo', 'bar'); // setter 16 | * utils.flag(this, 'foo'); // getter, returns `bar` 17 | * 18 | * @param {Object} object (constructed Assertion 19 | * @param {String} key 20 | * @param {Mixed} value (optional) 21 | * @name flag 22 | * @api private 23 | */ 24 | 25 | module.exports = function (obj, key, value) { 26 | var flags = obj.__flags || (obj.__flags = Object.create(null)); 27 | if (arguments.length === 3) { 28 | flags[key] = value; 29 | } else { 30 | return flags[key]; 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /examples_two/node_modules/chai/lib/chai/utils/getProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getProperties(object) 9 | * 10 | * This allows the retrieval of property names of an object, enumerable or not, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getProperties(object) { 20 | var result = Object.getOwnPropertyNames(subject); 21 | 22 | function addProperty(property) { 23 | if (result.indexOf(property) === -1) { 24 | result.push(property); 25 | } 26 | } 27 | 28 | var proto = Object.getPrototypeOf(subject); 29 | while (proto !== null) { 30 | Object.getOwnPropertyNames(proto).forEach(addProperty); 31 | proto = Object.getPrototypeOf(proto); 32 | } 33 | 34 | return result; 35 | }; 36 | -------------------------------------------------------------------------------- /more_node_examples/node_modules/chai/lib/chai/utils/getProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getProperties(object) 9 | * 10 | * This allows the retrieval of property names of an object, enumerable or not, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getProperties(object) { 20 | var result = Object.getOwnPropertyNames(object); 21 | 22 | function addProperty(property) { 23 | if (result.indexOf(property) === -1) { 24 | result.push(property); 25 | } 26 | } 27 | 28 | var proto = Object.getPrototypeOf(object); 29 | while (proto !== null) { 30 | Object.getOwnPropertyNames(proto).forEach(addProperty); 31 | proto = Object.getPrototypeOf(proto); 32 | } 33 | 34 | return result; 35 | }; 36 | -------------------------------------------------------------------------------- /node_examples/node_modules/chai/lib/chai/utils/getProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getProperties(object) 9 | * 10 | * This allows the retrieval of property names of an object, enumerable or not, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getProperties(object) { 20 | var result = Object.getOwnPropertyNames(subject); 21 | 22 | function addProperty(property) { 23 | if (result.indexOf(property) === -1) { 24 | result.push(property); 25 | } 26 | } 27 | 28 | var proto = Object.getPrototypeOf(subject); 29 | while (proto !== null) { 30 | Object.getOwnPropertyNames(proto).forEach(addProperty); 31 | proto = Object.getPrototypeOf(proto); 32 | } 33 | 34 | return result; 35 | }; 36 | -------------------------------------------------------------------------------- /testing_example/node_modules/chai/lib/chai/utils/getProperties.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Chai - getProperties utility 3 | * Copyright(c) 2012-2014 Jake Luer 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * ### .getProperties(object) 9 | * 10 | * This allows the retrieval of property names of an object, enumerable or not, 11 | * inherited or not. 12 | * 13 | * @param {Object} object 14 | * @returns {Array} 15 | * @name getProperties 16 | * @api public 17 | */ 18 | 19 | module.exports = function getProperties(object) { 20 | var result = Object.getOwnPropertyNames(subject); 21 | 22 | function addProperty(property) { 23 | if (result.indexOf(property) === -1) { 24 | result.push(property); 25 | } 26 | } 27 | 28 | var proto = Object.getPrototypeOf(subject); 29 | while (proto !== null) { 30 | Object.getOwnPropertyNames(proto).forEach(addProperty); 31 | proto = Object.getPrototypeOf(proto); 32 | } 33 | 34 | return result; 35 | }; 36 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/perm.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('async perm', function (t) { 8 | t.plan(5); 9 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); 10 | 11 | mkdirp(file, 0755, function (err) { 12 | t.ifError(err); 13 | exists(file, function (ex) { 14 | t.ok(ex, 'file created'); 15 | fs.stat(file, function (err, stat) { 16 | t.ifError(err); 17 | t.equal(stat.mode & 0777, 0755); 18 | t.ok(stat.isDirectory(), 'target not a directory'); 19 | }) 20 | }) 21 | }); 22 | }); 23 | 24 | test('async root perm', function (t) { 25 | mkdirp('/tmp', 0755, function (err) { 26 | if (err) t.fail(err); 27 | t.end(); 28 | }); 29 | t.end(); 30 | }); 31 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/supports-color/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var argv = process.argv; 3 | 4 | module.exports = (function () { 5 | if (argv.indexOf('--no-color') !== -1 || 6 | argv.indexOf('--no-colors') !== -1 || 7 | argv.indexOf('--color=false') !== -1) { 8 | return false; 9 | } 10 | 11 | if (argv.indexOf('--color') !== -1 || 12 | argv.indexOf('--colors') !== -1 || 13 | argv.indexOf('--color=true') !== -1 || 14 | argv.indexOf('--color=always') !== -1) { 15 | return true; 16 | } 17 | 18 | if (process.stdout && !process.stdout.isTTY) { 19 | return false; 20 | } 21 | 22 | if (process.platform === 'win32') { 23 | return true; 24 | } 25 | 26 | if ('COLORTERM' in process.env) { 27 | return true; 28 | } 29 | 30 | if (process.env.TERM === 'dumb') { 31 | return false; 32 | } 33 | 34 | if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { 35 | return true; 36 | } 37 | 38 | return false; 39 | })(); 40 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/testing/user.js: -------------------------------------------------------------------------------- 1 | function anonymous(locals, attrs, escape, rethrow) { 2 | var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow; 3 | var __jade = [{ lineno: 1, filename: "testing/user.jade" }]; 4 | try { 5 | var buf = []; 6 | with (locals || {}) { 7 | var interp; 8 | __jade.unshift({ lineno: 1, filename: __jade[0].filename }); 9 | __jade.unshift({ lineno: 1, filename: __jade[0].filename }); 10 | buf.push('

Tobi'); 11 | __jade.unshift({ lineno: undefined, filename: __jade[0].filename }); 12 | __jade.shift(); 13 | buf.push('

'); 14 | __jade.shift(); 15 | __jade.unshift({ lineno: 2, filename: __jade[0].filename }); 16 | buf.push('

Is a ferret'); 17 | __jade.unshift({ lineno: undefined, filename: __jade[0].filename }); 18 | __jade.shift(); 19 | buf.push('

'); 20 | __jade.shift(); 21 | __jade.shift(); 22 | } 23 | return buf.join(""); 24 | } catch (err) { 25 | rethrow(err, __jade[0].filename, __jade[0].lineno); 26 | } 27 | } -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/long.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('long opts', function (t) { 5 | t.deepEqual( 6 | parse([ '--bool' ]), 7 | { bool : true, _ : [] }, 8 | 'long boolean' 9 | ); 10 | t.deepEqual( 11 | parse([ '--pow', 'xixxle' ]), 12 | { pow : 'xixxle', _ : [] }, 13 | 'long capture sp' 14 | ); 15 | t.deepEqual( 16 | parse([ '--pow=xixxle' ]), 17 | { pow : 'xixxle', _ : [] }, 18 | 'long capture eq' 19 | ); 20 | t.deepEqual( 21 | parse([ '--host', 'localhost', '--port', '555' ]), 22 | { host : 'localhost', port : 555, _ : [] }, 23 | 'long captures sp' 24 | ); 25 | t.deepEqual( 26 | parse([ '--host=localhost', '--port=555' ]), 27 | { host : 'localhost', port : 555, _ : [] }, 28 | 'long captures eq' 29 | ); 30 | t.end(); 31 | }); 32 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/return.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(4); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | mkdirp(file, function (err, made) { 18 | t.ifError(err); 19 | t.equal(made, '/tmp/' + x); 20 | mkdirp(file, function (err, made) { 21 | t.ifError(err); 22 | t.equal(made, null); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/testing/user.js: -------------------------------------------------------------------------------- 1 | function anonymous(locals, attrs, escape, rethrow) { 2 | var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow; 3 | var __jade = [{ lineno: 1, filename: "testing/user.jade" }]; 4 | try { 5 | var buf = []; 6 | with (locals || {}) { 7 | var interp; 8 | __jade.unshift({ lineno: 1, filename: __jade[0].filename }); 9 | __jade.unshift({ lineno: 1, filename: __jade[0].filename }); 10 | buf.push('

Tobi'); 11 | __jade.unshift({ lineno: undefined, filename: __jade[0].filename }); 12 | __jade.shift(); 13 | buf.push('

'); 14 | __jade.shift(); 15 | __jade.unshift({ lineno: 2, filename: __jade[0].filename }); 16 | buf.push('

Is a ferret'); 17 | __jade.unshift({ lineno: undefined, filename: __jade[0].filename }); 18 | __jade.shift(); 19 | buf.push('

'); 20 | __jade.shift(); 21 | __jade.shift(); 22 | } 23 | return buf.join(""); 24 | } catch (err) { 25 | rethrow(err, __jade[0].filename, __jade[0].lineno); 26 | } 27 | } -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/perm.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('async perm', function (t) { 8 | t.plan(5); 9 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); 10 | 11 | mkdirp(file, 0755, function (err) { 12 | t.ifError(err); 13 | exists(file, function (ex) { 14 | t.ok(ex, 'file created'); 15 | fs.stat(file, function (err, stat) { 16 | t.ifError(err); 17 | t.equal(stat.mode & 0777, 0755); 18 | t.ok(stat.isDirectory(), 'target not a directory'); 19 | }) 20 | }) 21 | }); 22 | }); 23 | 24 | test('async root perm', function (t) { 25 | mkdirp('/tmp', 0755, function (err) { 26 | if (err) t.fail(err); 27 | t.end(); 28 | }); 29 | t.end(); 30 | }); 31 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/return.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(4); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | mkdirp(file, function (err, made) { 18 | t.ifError(err); 19 | t.equal(made, '/tmp/' + x); 20 | mkdirp(file, function (err, made) { 21 | t.ifError(err); 22 | t.equal(made, null); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/long.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('long opts', function (t) { 5 | t.deepEqual( 6 | parse([ '--bool' ]), 7 | { bool : true, _ : [] }, 8 | 'long boolean' 9 | ); 10 | t.deepEqual( 11 | parse([ '--pow', 'xixxle' ]), 12 | { pow : 'xixxle', _ : [] }, 13 | 'long capture sp' 14 | ); 15 | t.deepEqual( 16 | parse([ '--pow=xixxle' ]), 17 | { pow : 'xixxle', _ : [] }, 18 | 'long capture eq' 19 | ); 20 | t.deepEqual( 21 | parse([ '--host', 'localhost', '--port', '555' ]), 22 | { host : 'localhost', port : 555, _ : [] }, 23 | 'long captures sp' 24 | ); 25 | t.deepEqual( 26 | parse([ '--host=localhost', '--port=555' ]), 27 | { host : 'localhost', port : 555, _ : [] }, 28 | 'long captures eq' 29 | ); 30 | t.end(); 31 | }); 32 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('woo', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | mkdirp(file, 0755, function (err) { 16 | t.ifError(err); 17 | exists(file, function (ex) { 18 | t.ok(ex, 'file created'); 19 | fs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }) 24 | }) 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('woo', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | mkdirp(file, 0755, function (err) { 16 | t.ifError(err); 17 | exists(file, function (ex) { 18 | t.ok(ex, 'file created'); 19 | fs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }) 24 | }) 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/return_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | // Note that this will throw on failure, which will fail the test. 18 | var made = mkdirp.sync(file); 19 | t.equal(made, '/tmp/' + x); 20 | 21 | // making the same file again should have no effect. 22 | made = mkdirp.sync(file); 23 | t.equal(made, null); 24 | }); 25 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/debug/node_modules/ms/README.md: -------------------------------------------------------------------------------- 1 | # ms.js: miliseconds conversion utility 2 | 3 | ```js 4 | ms('1d') // 86400000 5 | ms('10h') // 36000000 6 | ms('2h') // 7200000 7 | ms('1m') // 60000 8 | ms('5s') // 5000 9 | ms('100') // 100 10 | ``` 11 | 12 | ```js 13 | ms(60000) // "1m" 14 | ms(2 * 60000) // "2m" 15 | ms(ms('10 hours')) // "10h" 16 | ``` 17 | 18 | ```js 19 | ms(60000, { long: true }) // "1 minute" 20 | ms(2 * 60000, { long: true }) // "2 minutes" 21 | ms(ms('10 hours', { long: true })) // "10 hours" 22 | ``` 23 | 24 | - Node/Browser compatible. Published as `ms` in NPM. 25 | - If a number is supplied to `ms`, a string with a unit is returned. 26 | - If a string that contains the number is supplied, it returns it as 27 | a number (e.g: it returns `100` for `'100'`). 28 | - If you pass a string with a number and a valid unit, the number of 29 | equivalent ms is returned. 30 | 31 | ## License 32 | 33 | MIT -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('sync', function (t) { 8 | t.plan(4); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | try { 16 | mkdirp.sync(file, 0755); 17 | } catch (err) { 18 | t.fail(err); 19 | return t.end(); 20 | } 21 | 22 | exists(file, function (ex) { 23 | t.ok(ex, 'file created'); 24 | fs.stat(file, function (err, stat) { 25 | t.ifError(err); 26 | t.equal(stat.mode & 0777, 0755); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/return_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | // Note that this will throw on failure, which will fail the test. 18 | var made = mkdirp.sync(file); 19 | t.equal(made, '/tmp/' + x); 20 | 21 | // making the same file again should have no effect. 22 | made = mkdirp.sync(file); 23 | t.equal(made, null); 24 | }); 25 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/debug/node_modules/ms/README.md: -------------------------------------------------------------------------------- 1 | # ms.js: miliseconds conversion utility 2 | 3 | ```js 4 | ms('1d') // 86400000 5 | ms('10h') // 36000000 6 | ms('2h') // 7200000 7 | ms('1m') // 60000 8 | ms('5s') // 5000 9 | ms('100') // 100 10 | ``` 11 | 12 | ```js 13 | ms(60000) // "1m" 14 | ms(2 * 60000) // "2m" 15 | ms(ms('10 hours')) // "10h" 16 | ``` 17 | 18 | ```js 19 | ms(60000, { long: true }) // "1 minute" 20 | ms(2 * 60000, { long: true }) // "2 minutes" 21 | ms(ms('10 hours', { long: true })) // "10 hours" 22 | ``` 23 | 24 | - Node/Browser compatible. Published as `ms` in NPM. 25 | - If a number is supplied to `ms`, a string with a unit is returned. 26 | - If a string that contains the number is supplied, it returns it as 27 | a number (e.g: it returns `100` for `'100'`). 28 | - If you pass a string with a number and a valid unit, the number of 29 | equivalent ms is returned. 30 | 31 | ## License 32 | 33 | MIT -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('sync', function (t) { 8 | t.plan(4); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | try { 16 | mkdirp.sync(file, 0755); 17 | } catch (err) { 18 | t.fail(err); 19 | return t.end(); 20 | } 21 | 22 | exists(file, function (ex) { 23 | t.ok(ex, 'file created'); 24 | fs.stat(file, function (err, stat) { 25 | t.ifError(err); 26 | t.equal(stat.mode & 0777, 0755); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/growl/test.js: -------------------------------------------------------------------------------- 1 | 2 | var growl = require('./lib/growl') 3 | 4 | growl('You have mail!') 5 | growl('5 new messages', { sticky: true }) 6 | growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) 7 | growl('Message with title', { title: 'Title'}) 8 | growl('Set priority', { priority: 2 }) 9 | growl('Show Safari icon', { image: 'Safari' }) 10 | growl('Show icon', { image: 'path/to/icon.icns' }) 11 | growl('Show image', { image: 'path/to/my.image.png' }) 12 | growl('Show png filesystem icon', { image: 'png' }) 13 | growl('Show pdf filesystem icon', { image: 'article.pdf' }) 14 | growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){ 15 | console.log('callback'); 16 | }) 17 | growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' }) 18 | growl('here \' are \n some \\ characters that " need escaping', {}, function(error, stdout, stderr) { 19 | if (error !== null) throw new Error('escaping failed:\n' + stdout + stderr); 20 | }) 21 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/growl/test.js: -------------------------------------------------------------------------------- 1 | 2 | var growl = require('./lib/growl') 3 | 4 | growl('You have mail!') 5 | growl('5 new messages', { sticky: true }) 6 | growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) 7 | growl('Message with title', { title: 'Title'}) 8 | growl('Set priority', { priority: 2 }) 9 | growl('Show Safari icon', { image: 'Safari' }) 10 | growl('Show icon', { image: 'path/to/icon.icns' }) 11 | growl('Show image', { image: 'path/to/my.image.png' }) 12 | growl('Show png filesystem icon', { image: 'png' }) 13 | growl('Show pdf filesystem icon', { image: 'article.pdf' }) 14 | growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){ 15 | console.log('callback'); 16 | }) 17 | growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' }) 18 | growl('here \' are \n some \\ characters that " need escaping', {}, function(error, stdout, stderr) { 19 | if (error !== null) throw new Error('escaping failed:\n' + stdout + stderr); 20 | }) 21 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/umask.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('implicit mode from umask', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | mkdirp(file, function (err) { 16 | t.ifError(err); 17 | exists(file, function (ex) { 18 | t.ok(ex, 'file created'); 19 | fs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0777 & (~process.umask())); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }); 24 | }) 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/umask.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('implicit mode from umask', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | mkdirp(file, function (err) { 16 | t.ifError(err); 17 | exists(file, function (ex) { 18 | t.ok(ex, 'file created'); 19 | fs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0777 & (~process.umask())); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }); 24 | }) 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('sync', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | var err = mkdirp.sync(file, 0755); 15 | if (err) t.fail(err); 16 | else path.exists(file, function (ex) { 17 | if (!ex) t.fail('file not created') 18 | else fs.stat(file, function (err, stat) { 19 | if (err) t.fail(err) 20 | else { 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | t.end(); 24 | } 25 | }) 26 | }) 27 | }); 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | 6 | test('opts.fs', function (t) { 7 | t.plan(5); 8 | 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/beep/boop/' + [x,y,z].join('/'); 14 | var xfs = mockfs.fs(); 15 | 16 | mkdirp(file, { fs: xfs, mode: 0755 }, function (err) { 17 | t.ifError(err); 18 | xfs.exists(file, function (ex) { 19 | t.ok(ex, 'created file'); 20 | xfs.stat(file, function (err, stat) { 21 | t.ifError(err); 22 | t.equal(stat.mode & 0777, 0755); 23 | t.ok(stat.isDirectory(), 'target not a directory'); 24 | }); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('sync', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | var err = mkdirp.sync(file, 0755); 15 | if (err) t.fail(err); 16 | else path.exists(file, function (ex) { 17 | if (!ex) t.fail('file not created') 18 | else fs.stat(file, function (err, stat) { 19 | if (err) t.fail(err) 20 | else { 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | t.end(); 24 | } 25 | }) 26 | }) 27 | }); 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/clobber.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | var ps = [ '', 'tmp' ]; 7 | 8 | for (var i = 0; i < 25; i++) { 9 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | ps.push(dir); 11 | } 12 | 13 | var file = ps.join('/'); 14 | 15 | // a file in the way 16 | var itw = ps.slice(0, 3).join('/'); 17 | 18 | 19 | test('clobber-pre', function (t) { 20 | console.error("about to write to "+itw) 21 | fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); 22 | 23 | fs.stat(itw, function (er, stat) { 24 | t.ifError(er) 25 | t.ok(stat && stat.isFile(), 'should be file') 26 | t.end() 27 | }) 28 | }) 29 | 30 | test('clobber', function (t) { 31 | t.plan(2); 32 | mkdirp(file, 0755, function (err) { 33 | t.ok(err); 34 | t.equal(err.code, 'ENOTDIR'); 35 | t.end(); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/clobber.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | var ps = [ '', 'tmp' ]; 7 | 8 | for (var i = 0; i < 25; i++) { 9 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | ps.push(dir); 11 | } 12 | 13 | var file = ps.join('/'); 14 | 15 | // a file in the way 16 | var itw = ps.slice(0, 3).join('/'); 17 | 18 | 19 | test('clobber-pre', function (t) { 20 | console.error("about to write to "+itw) 21 | fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); 22 | 23 | fs.stat(itw, function (er, stat) { 24 | t.ifError(er) 25 | t.ok(stat && stat.isFile(), 'should be file') 26 | t.end() 27 | }) 28 | }) 29 | 30 | test('clobber', function (t) { 31 | t.plan(2); 32 | mkdirp(file, 0755, function (err) { 33 | t.ok(err); 34 | t.equal(err.code, 'ENOTDIR'); 35 | t.end(); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /testing_example/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | 6 | test('opts.fs', function (t) { 7 | t.plan(5); 8 | 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/beep/boop/' + [x,y,z].join('/'); 14 | var xfs = mockfs.fs(); 15 | 16 | mkdirp(file, { fs: xfs, mode: 0755 }, function (err) { 17 | t.ifError(err); 18 | xfs.exists(file, function (ex) { 19 | t.ok(ex, 'created file'); 20 | xfs.stat(file, function (err, stat) { 21 | t.ifError(err); 22 | t.equal(stat.mode & 0777, 0755); 23 | t.ok(stat.isDirectory(), 'target not a directory'); 24 | }); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('umask sync modes', function (t) { 8 | t.plan(4); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | try { 16 | mkdirp.sync(file); 17 | } catch (err) { 18 | t.fail(err); 19 | return t.end(); 20 | } 21 | 22 | exists(file, function (ex) { 23 | t.ok(ex, 'file created'); 24 | fs.stat(file, function (err, stat) { 25 | t.ifError(err); 26 | t.equal(stat.mode & 0777, (0777 & (~process.umask()))); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /node_examples/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | var ps = [ '', 'tmp' ]; 7 | 8 | for (var i = 0; i < 25; i++) { 9 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | ps.push(dir); 11 | } 12 | 13 | var file = ps.join('/'); 14 | 15 | // a file in the way 16 | var itw = ps.slice(0, 3).join('/'); 17 | 18 | 19 | test('clobber-pre', function (t) { 20 | console.error("about to write to "+itw) 21 | fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); 22 | 23 | fs.stat(itw, function (er, stat) { 24 | t.ifError(er) 25 | t.ok(stat && stat.isFile(), 'should be file') 26 | t.end() 27 | }) 28 | }) 29 | 30 | test('clobber', function (t) { 31 | t.plan(2); 32 | mkdirp(file, 0755, function (err) { 33 | t.ok(err); 34 | t.equal(err.code, 'ENOTDIR'); 35 | t.end(); 36 | }); 37 | }); 38 | --------------------------------------------------------------------------------