├── .gitignore ├── .npmignore ├── bower_components ├── mocha │ ├── scripts │ │ └── ensure-compatible-npm.sh │ ├── .editorconfig │ ├── media │ │ └── logo.svg │ ├── README.md │ ├── .mailmap │ ├── bower.json │ ├── LICENSE │ ├── .bower.json │ ├── CONTRIBUTING.md │ ├── .eslintrc │ ├── mocha.css │ └── CHANGELOG.md └── chai │ ├── bower.json │ ├── karma.conf.js │ ├── .bower.json │ ├── karma.sauce.js │ ├── package.json │ ├── sauce.browsers.js │ ├── CODE_OF_CONDUCT.md │ ├── README.md │ ├── CONTRIBUTING.md │ ├── ReleaseNotes.md │ └── History.md ├── package.json ├── bower.json ├── test ├── index.html └── bloomfilter-test.js ├── LICENSE ├── README.md └── bloomfilter.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /bower_components/mocha/scripts/ensure-compatible-npm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -o nounset 4 | set -o errexit 5 | 6 | npm install semver 7 | if node -e "process.exit(require('semver').lt(process.argv[1], '1.3.7') ? 0 : 1)" $(npm -v); then 8 | npm install -g npm@2 9 | npm install -g npm 10 | fi 11 | npm uninstall semver 12 | -------------------------------------------------------------------------------- /bower_components/mocha/.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [Makefile] 15 | indent_style = tab 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bloomfilter", 3 | "version": "0.0.16", 4 | "description": "Fast bloom filter in JavaScript.", 5 | "keywords": [ 6 | "bloom filter", 7 | "probabilistic data structure" 8 | ], 9 | "homepage": "https://github.com/jasondavies/bloomfilter.js", 10 | "author": { 11 | "name": "Jason Davies", 12 | "url": "http://www.jasondavies.com/" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "http://github.com/jasondavies/bloomfilter.js.git" 17 | }, 18 | "main": "bloomfilter.js", 19 | "devDependencies": { } 20 | } 21 | -------------------------------------------------------------------------------- /bower_components/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 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bloomfilter", 3 | "description": "Fast bloom filter in JavaScript.", 4 | "main": "bloomfilter.js", 5 | "authors": [ 6 | "Jason Davies" 7 | ], 8 | "license": "MIT", 9 | "keywords": [ 10 | "bloom", 11 | "filter", 12 | "probabilistic", 13 | "data", 14 | "structure" 15 | ], 16 | "homepage": "https://github.com/jasondavies/bloomfilter.js", 17 | "moduleType": [ 18 | "globals", 19 | "node" 20 | ], 21 | "private": true, 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "test", 27 | "tests" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /bower_components/mocha/media/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | mocha 7 | 8 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Bloom Filter Unit Tests 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 17 | 18 | 19 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bower_components/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 | -------------------------------------------------------------------------------- /bower_components/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 | - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) 10 | - [Google Group](http://groups.google.com/group/mochajs) 11 | - [Wiki](https://github.com/mochajs/mocha/wiki) 12 | - Mocha [Extensions and reporters](https://github.com/mochajs/mocha/wiki) 13 | -------------------------------------------------------------------------------- /bower_components/mocha/.mailmap: -------------------------------------------------------------------------------- 1 | TJ Holowaychuk 2 | Travis Jeffery 3 | Travis Jeffery Dr. Travis Jeffery 4 | Christopher Hiller Christopher Hiller 5 | David da Silva Contín David da Silva 6 | David da Silva Contín David da Silva 7 | Ariel Mashraki Ariel Mashraki 8 | Ariel Mashraki Ariel Mashraki 9 | Forbes Lindesay Forbes Lindesay 10 | Ben Bradley Ben Bradley <[ben.bradley@cigna.com|mailto:ben.bradley@cigna.com]> 11 | Glen Mailer Glen Mailer 12 | -------------------------------------------------------------------------------- /bower_components/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 | "homepage": "https://github.com/chaijs/chai", 27 | "version": "3.5.0", 28 | "_release": "3.5.0", 29 | "_resolution": { 30 | "type": "version", 31 | "tag": "3.5.0", 32 | "commit": "57c85f624a7e19ffaf1a2c7d07d81180db17bec7" 33 | }, 34 | "_source": "https://github.com/chaijs/chai.git", 35 | "_target": "^3.5.0", 36 | "_originalSource": "chai", 37 | "_direct": true 38 | } -------------------------------------------------------------------------------- /bower_components/mocha/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mocha", 3 | "homepage": "http://mocha.github.io/mocha", 4 | "description": "simple, flexible, fun test framework", 5 | "authors": [ 6 | "TJ Holowaychuk ", 7 | "Joshua Appelman ", 8 | "Oleg Gaidarenko ", 9 | "Christoffer Hallas ", 10 | "Christopher Hiller ", 11 | "Travis Jeffery ", 12 | "Johnathan Ong ", 13 | "Guillermo Rauch " 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/mochajs/mocha.git" 18 | }, 19 | "main": [ 20 | "mocha.js", 21 | "mocha.css" 22 | ], 23 | "ignore": [ 24 | "bin", 25 | "editors", 26 | "images", 27 | "lib", 28 | "support", 29 | "test", 30 | ".gitignore", 31 | ".npmignore", 32 | ".travis.yml", 33 | "component.json", 34 | "index.js", 35 | "Makefile", 36 | "package.json" 37 | ], 38 | "keywords": [ 39 | "mocha", 40 | "test", 41 | "bdd", 42 | "tdd", 43 | "tap" 44 | ], 45 | "license": "MIT" 46 | } 47 | -------------------------------------------------------------------------------- /bower_components/mocha/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011-2016 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /bower_components/chai/karma.sauce.js: -------------------------------------------------------------------------------- 1 | var version = require('./package.json').version; 2 | var ts = new Date().getTime(); 3 | 4 | module.exports = function(config) { 5 | var auth; 6 | 7 | try { 8 | auth = require('./test/auth/index'); 9 | } catch(ex) { 10 | auth = {}; 11 | auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null; 12 | auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null; 13 | } 14 | 15 | if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return; 16 | if (process.env.SKIP_SAUCE) return; 17 | 18 | var branch = process.env.TRAVIS_BRANCH || 'local' 19 | var browserConfig = require('./sauce.browsers'); 20 | var browsers = Object.keys(browserConfig); 21 | var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ]; 22 | var tunnel = process.env.TRAVIS_JOB_NUMBER || ts; 23 | 24 | if (process.env.TRAVIS_JOB_NUMBER) { 25 | tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER); 26 | } 27 | 28 | config.browsers = config.browsers.concat(browsers); 29 | config.customLaunchers = browserConfig; 30 | config.reporters.push('saucelabs'); 31 | config.transports = [ 'xhr-polling' ]; 32 | 33 | config.sauceLabs = { 34 | username: auth.SAUCE_USERNAME 35 | , accessKey: auth.SAUCE_ACCESS_KEY 36 | , startConnect: true 37 | , tags: tags 38 | , testName: 'ChaiJS' 39 | , tunnelIdentifier: tunnel 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /bower_components/chai/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Jake Luer ", 3 | "name": "chai", 4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", 5 | "keywords": [ 6 | "test", 7 | "assertion", 8 | "assert", 9 | "testing", 10 | "chai" 11 | ], 12 | "homepage": "http://chaijs.com", 13 | "license": "MIT", 14 | "contributors": [ 15 | "Jake Luer ", 16 | "Domenic Denicola (http://domenicdenicola.com)", 17 | "Veselin Todorov ", 18 | "John Firebaugh " 19 | ], 20 | "version": "3.5.0", 21 | "repository": { 22 | "type": "git", 23 | "url": "https://github.com/chaijs/chai" 24 | }, 25 | "bugs": { 26 | "url": "https://github.com/chaijs/chai/issues" 27 | }, 28 | "main": "./index", 29 | "scripts": { 30 | "test": "make test" 31 | }, 32 | "engines": { 33 | "node": ">= 0.4.0" 34 | }, 35 | "dependencies": { 36 | "assertion-error": "^1.0.1", 37 | "deep-eql": "^0.1.3", 38 | "type-detect": "^1.0.0" 39 | }, 40 | "devDependencies": { 41 | "browserify": "^10.2.1", 42 | "bump-cli": "^1.1.3", 43 | "karma": "^0.13.16", 44 | "karma-mocha": "^0.1.10", 45 | "karma-sauce-launcher": "^0.2.11", 46 | "karma-phantomjs-launcher": "^0.2.0", 47 | "karma-firefox-launcher": "^0.1.6", 48 | "mocha": "^2.2.5", 49 | "istanbul": "^0.3.14" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Jason Davies 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * The name Jason Davies may not be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL JASON DAVIES BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /bower_components/mocha/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mocha", 3 | "homepage": "http://mocha.github.io/mocha", 4 | "description": "simple, flexible, fun test framework", 5 | "authors": [ 6 | "TJ Holowaychuk ", 7 | "Joshua Appelman ", 8 | "Oleg Gaidarenko ", 9 | "Christoffer Hallas ", 10 | "Christopher Hiller ", 11 | "Travis Jeffery ", 12 | "Johnathan Ong ", 13 | "Guillermo Rauch " 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/mochajs/mocha.git" 18 | }, 19 | "main": [ 20 | "mocha.js", 21 | "mocha.css" 22 | ], 23 | "ignore": [ 24 | "bin", 25 | "editors", 26 | "images", 27 | "lib", 28 | "support", 29 | "test", 30 | ".gitignore", 31 | ".npmignore", 32 | ".travis.yml", 33 | "component.json", 34 | "index.js", 35 | "Makefile", 36 | "package.json" 37 | ], 38 | "keywords": [ 39 | "mocha", 40 | "test", 41 | "bdd", 42 | "tdd", 43 | "tap" 44 | ], 45 | "license": "MIT", 46 | "version": "2.4.5", 47 | "_release": "2.4.5", 48 | "_resolution": { 49 | "type": "version", 50 | "tag": "v2.4.5", 51 | "commit": "577f3ea11494dc569fe361ced34a2c3ab5b97d6b" 52 | }, 53 | "_source": "https://github.com/mochajs/mocha.git", 54 | "_target": "^2.4.5", 55 | "_originalSource": "mocha", 56 | "_direct": true 57 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Bloom Filter 2 | ============ 3 | 4 | This JavaScript bloom filter implementation uses the non-cryptographic 5 | [Fowler–Noll–Vo hash function][1] for speed. 6 | 7 | Usage 8 | ----- 9 | 10 | var bloom = new BloomFilter( 11 | 32 * 256, // number of bits to allocate. 12 | 16 // number of hash functions. 13 | ); 14 | 15 | // Add some elements to the filter. 16 | bloom.add("foo"); 17 | bloom.add("bar"); 18 | 19 | // Test if an item is in our filter. 20 | // Returns true if an item is probably in the set, 21 | // or false if an item is definitely not in the set. 22 | bloom.test("foo"); 23 | bloom.test("bar"); 24 | bloom.test("blah"); 25 | 26 | // Serialisation. Note that bloom.buckets may be a typed array, 27 | // so we convert to a normal array first. 28 | var array = [].slice.call(bloom.buckets), 29 | json = JSON.stringify(array); 30 | 31 | // Deserialisation. Note that the any array-like object is supported, but 32 | // this will be used directly, so you may wish to use a typed array for 33 | // performance. 34 | var bloom = new BloomFilter(array, 3); 35 | 36 | Implementation 37 | -------------- 38 | 39 | Although the bloom filter requires *k* hash functions, we can simulate this 40 | using only *two* hash functions. In fact, we cheat and get the second hash 41 | function almost for free by iterating once more on the first hash using the FNV 42 | hash algorithm. 43 | 44 | Thanks to Will Fitzgerald for his [help and inspiration][2] with the hashing 45 | optimisation. 46 | 47 | [1]: http://isthe.com/chongo/tech/comp/fnv/ 48 | [2]: http://willwhim.wordpress.com/2011/09/03/producing-n-hash-functions-by-hashing-only-once/ 49 | -------------------------------------------------------------------------------- /bower_components/chai/sauce.browsers.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Chrome 4 | */ 5 | 6 | exports['SL_Chrome'] = { 7 | base: 'SauceLabs' 8 | , browserName: 'chrome' 9 | }; 10 | 11 | /*! 12 | * Firefox 13 | */ 14 | 15 | /*! 16 | * TODO: Karma doesn't seem to like this, though sauce boots its up 17 | * 18 | 19 | exports['SL_Firefox_23'] = { 20 | base: 'SauceLabs' 21 | , browserName: 'firefox' 22 | , platform: 'Windows XP' 23 | , version: '23' 24 | }; 25 | 26 | */ 27 | 28 | exports['SL_Firefox_22'] = { 29 | base: 'SauceLabs' 30 | , browserName: 'firefox' 31 | , platform: 'Windows 7' 32 | , version: '22' 33 | }; 34 | 35 | /*! 36 | * Opera 37 | */ 38 | 39 | exports['SL_Opera_12'] = { 40 | base: 'SauceLabs' 41 | , browserName: 'opera' 42 | , platform: 'Windows 7' 43 | , version: '12' 44 | }; 45 | 46 | exports['SL_Opera_11'] = { 47 | base: 'SauceLabs' 48 | , browserName: 'opera' 49 | , platform: 'Windows 7' 50 | , version: '11' 51 | }; 52 | 53 | /*! 54 | * Internet Explorer 55 | */ 56 | 57 | exports['SL_IE_10'] = { 58 | base: 'SauceLabs' 59 | , browserName: 'internet explorer' 60 | , platform: 'Windows 2012' 61 | , version: '10' 62 | }; 63 | 64 | /*! 65 | * Safari 66 | */ 67 | 68 | exports['SL_Safari_6'] = { 69 | base: 'SauceLabs' 70 | , browserName: 'safari' 71 | , platform: 'Mac 10.8' 72 | , version: '6' 73 | }; 74 | 75 | exports['SL_Safari_5'] = { 76 | base: 'SauceLabs' 77 | , browserName: 'safari' 78 | , platform: 'Mac 10.6' 79 | , version: '5' 80 | }; 81 | 82 | /*! 83 | * iPhone 84 | */ 85 | 86 | /*! 87 | * TODO: These take forever to boot or shut down. Causes timeout. 88 | * 89 | 90 | exports['SL_iPhone_6'] = { 91 | base: 'SauceLabs' 92 | , browserName: 'iphone' 93 | , platform: 'Mac 10.8' 94 | , version: '6' 95 | }; 96 | 97 | exports['SL_iPhone_5-1'] = { 98 | base: 'SauceLabs' 99 | , browserName: 'iphone' 100 | , platform: 'Mac 10.8' 101 | , version: '5.1' 102 | }; 103 | 104 | exports['SL_iPhone_5'] = { 105 | base: 'SauceLabs' 106 | , browserName: 'iphone' 107 | , platform: 'Mac 10.6' 108 | , version: '5' 109 | }; 110 | 111 | */ 112 | 113 | /*! 114 | * Android 115 | */ 116 | 117 | /*! 118 | * TODO: fails because of error serialization 119 | * 120 | 121 | exports['SL_Android_4'] = { 122 | base: 'SauceLabs' 123 | , browserName: 'android' 124 | , platform: 'Linux' 125 | , version: '4' 126 | }; 127 | 128 | */ 129 | -------------------------------------------------------------------------------- /bower_components/mocha/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Mocha 2 | 3 | Hi! We could use your help. Let us help you help us. Or something. 4 | 5 | ## General 6 | 7 | 1. If you are looking for a place to begin, **please send PRs for bugfixes instead of new features**, and/or **look for issues labeled `PR PLEASE`.** 8 | 9 | 2. **Help with documentation and the wiki is always appreciated**. 10 | 11 | 3. Please **be courteous and constructive** when commenting on issues, commits, and pull requests. 12 | 13 | ## Bug Reports & Issues 14 | 15 | 1. When reporting a bug, please **provide steps to reproduce**. If possible, show code. 16 | 17 | 2. Please **show all code in JavaScript**. We don't all read ``. If you do not, you will be asked to. 18 | 19 | 3. Because Mocha works with many third-party libraries and tools, **ensure the bug you are reporting is actually within Mocha**. 20 | 21 | 4. If you report a bug, and it is inactive for a significant amount of time, it may be closed. **Please respond promptly to requests for more information**. 22 | 23 | ## Pull Requests 24 | 25 | 1. Before sending a large PR, it's recommended to **create an issue to propose the change**. Nobody wants to write a book of code and throw it away. 26 | 27 | 2. Because Mocha should be kept as maintainable as possible, its codebase must be kept slim. Historically, *most PRs for new features are not merged*. New features inevitably increase the size of the codebase, and thus reduce maintainability. Only features *deemed essential* are likely to be merged--this is at the discretion of the maintainer(s). If your PR for a feature is not merged, this doesn't necessarily mean your PR was a bad idea, wouldn't be used, or otherwise sucks. It just means **only essential PRs for new features are likely to be merged**. 28 | 29 | 3. Due to the above, before creating a PR for a new feature, **create an issue to propose the feature.** 30 | 31 | 4. Please **respect existing coding conventions**, whatever those may be. 32 | 33 | 5. If your PR has been waiting in limbo for some time, it's very helpful to **rebase against master**, which will make it easier to merge. 34 | 35 | 6. Please **add tests for new code**. 36 | 37 | 7. **Always run `npm test` before sending a PR.** If you break the tests, your PR will not be accepted until they are fixed. 38 | 39 | ## Source Control 40 | 41 | 1. Please **squash your commits** when sending a pull request. If you are unfamiliar with this process, see [this guide](https://help.github.com/articles/about-git-rebase/). If you have already pushed your changesets and are squashing thereafter, this may necessitate the use of a "force push". Please [read the docs](http://git-scm.com/docs/git-push) before you attempt this. 42 | 43 | 2. Please **follow the commit message conventions [outlined here](https://medium.com/code-adventures/git-conventions-a940ee20862d).** 44 | 45 | ## TL;DR 46 | 47 | **Be kind, be diligent, look before you leap into a PR, and follow common community conventions**. 48 | 49 | *- The Mocha Team* 50 | -------------------------------------------------------------------------------- /bower_components/chai/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | > Read in: [Español](http://contributor-covenant.org/version/1/3/0/es/) | 4 | [Français](http://contributor-covenant.org/version/1/3/0/fr/) | 5 | [Italiano](http://contributor-covenant.org/version/1/3/0/it/) | 6 | [Magyar](http://contributor-covenant.org/version/1/3/0/hu/) | 7 | [Polskie](http://contributor-covenant.org/version/1/3/0/pl/) | 8 | [Português](http://contributor-covenant.org/version/1/3/0/pt/) | 9 | [Português do Brasil](http://contributor-covenant.org/version/1/3/0/pt_br/) 10 | 11 | As contributors and maintainers of this project, and in the interest of 12 | fostering an open and welcoming community, we pledge to respect all people who 13 | contribute through reporting issues, posting feature requests, updating 14 | documentation, submitting pull requests or patches, and other activities. 15 | 16 | We are committed to making participation in this project a harassment-free 17 | experience for everyone, regardless of level of experience, gender, gender 18 | identity and expression, sexual orientation, disability, personal appearance, 19 | body size, race, ethnicity, age, religion, or nationality. 20 | 21 | Examples of unacceptable behavior by participants include: 22 | 23 | * The use of sexualized language or imagery 24 | * Personal attacks 25 | * Trolling or insulting/derogatory comments 26 | * Public or private harassment 27 | * Publishing other's private information, such as physical or electronic 28 | addresses, without explicit permission 29 | * Other unethical or unprofessional conduct 30 | 31 | Project maintainers have the right and responsibility to remove, edit, or 32 | reject comments, commits, code, wiki edits, issues, and other contributions 33 | that are not aligned to this Code of Conduct, or to ban temporarily or 34 | permanently any contributor for other behaviors that they deem inappropriate, 35 | threatening, offensive, or harmful. 36 | 37 | By adopting this Code of Conduct, project maintainers commit themselves to 38 | fairly and consistently applying these principles to every aspect of managing 39 | this project. Project maintainers who do not follow or enforce the Code of 40 | Conduct may be permanently removed from the project team. 41 | 42 | This Code of Conduct applies both within project spaces and in public spaces 43 | when an individual is representing the project or its community. 44 | 45 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 46 | reported by contacting a project maintainer at [INSERT EMAIL ADDRESS]. All 47 | complaints will be reviewed and investigated and will result in a response that 48 | is deemed necessary and appropriate to the circumstances. Maintainers are 49 | obligated to maintain confidentiality with regard to the reporter of an 50 | incident. 51 | 52 | 53 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 54 | version 1.3.0, available at 55 | [http://contributor-covenant.org/version/1/3/0/][version] 56 | 57 | [homepage]: http://contributor-covenant.org 58 | [version]: http://contributor-covenant.org/version/1/3/0/ 59 | -------------------------------------------------------------------------------- /bower_components/mocha/.eslintrc: -------------------------------------------------------------------------------- 1 | --- 2 | env: 3 | node: true 4 | 5 | rules: 6 | brace-style: [2, 1tbs] 7 | camelcase: 2 8 | comma-dangle: [2, never] 9 | comma-spacing: [2, {before: false, after: true}] 10 | comma-style: [2, last] 11 | computed-property-spacing: [2, never] 12 | consistent-return: 0 13 | consistent-this: [1, self] 14 | curly: [2, all] 15 | default-case: 2 16 | dot-location: [2, property] 17 | dot-notation: [2, { allowKeywords: true, allowPattern: "^long$" }] 18 | eol-last: 2 19 | eqeqeq: 2 20 | func-style: [2, declaration] 21 | guard-for-in: 2 # TODO: Change to error 22 | handle-callback-err: [2, ^(err|error)$] 23 | indent: [2, 2, { SwitchCase: 1 }] 24 | key-spacing: [2, { beforeColon: false, afterColon: true }] 25 | max-len: [0, 80, 2] # TODO: Change to error 26 | max-params: [1, 4] 27 | new-cap: 0 # TODO: Change to error 28 | new-parens: 2 29 | no-alert: 2 30 | no-array-constructor: 0 31 | no-bitwise: 0 32 | no-caller: 2 33 | no-catch-shadow: 2 34 | no-cond-assign: [1, except-parens] # TODO: Change to error 35 | no-console: 0 36 | no-constant-condition: 0 37 | no-control-regex: 2 38 | no-debugger: 1 39 | no-delete-var: 2 40 | no-dupe-args: 2 41 | no-dupe-keys: 2 42 | no-duplicate-case: 2 43 | no-else-return: 2 44 | no-empty: 2 45 | no-empty-character-class: 2 46 | no-eq-null: 0 47 | no-eval: 2 48 | no-ex-assign: 2 49 | no-extend-native: 2 50 | no-extra-bind: 2 51 | no-extra-boolean-cast: 2 52 | no-extra-semi: 2 53 | no-fallthrough: 2 54 | no-floating-decimal: 0 55 | no-func-assign: 2 56 | no-implied-eval: 2 57 | no-inner-declarations: [2, functions] 58 | no-invalid-regexp: 2 59 | no-irregular-whitespace: 2 60 | no-iterator: 2 61 | no-labels: 2 62 | no-lone-blocks: 2 63 | no-lonely-if: 2 64 | no-loop-func: 2 65 | no-mixed-requires: [0, false] 66 | no-mixed-spaces-and-tabs: [2, false] 67 | no-multi-spaces: 2 68 | no-multi-str: 2 69 | no-multiple-empty-lines: [2, { max: 1 }] 70 | no-native-reassign: 2 71 | no-negated-in-lhs: 2 72 | no-nested-ternary: 2 73 | no-new: 2 74 | no-new-func: 2 75 | no-new-object: 2 76 | no-new-require: 2 77 | no-new-wrappers: 2 78 | no-obj-calls: 2 79 | no-octal: 2 80 | no-octal-escape: 2 81 | no-path-concat: 2 82 | no-process-exit: 2 83 | no-proto: 1 # TODO: Change to error 84 | no-redeclare: 2 85 | no-regex-spaces: 2 86 | no-return-assign: 2 87 | no-script-url: 2 88 | no-self-compare: 2 89 | no-sequences: 2 90 | no-shadow: 0 91 | no-shadow-restricted-names: 2 92 | no-spaced-func: 2 93 | no-sparse-arrays: 2 94 | no-trailing-spaces: 2 95 | no-undef: 2 96 | no-undef-init: 2 97 | no-underscore-dangle: 0 # TODO: Change to error 98 | no-unneeded-ternary: 2 99 | no-unreachable: 2 100 | no-unused-expressions: 0 101 | no-unused-vars: [2, { vars: all, args: after-used }] 102 | no-use-before-define: 0 103 | no-void: 2 104 | no-with: 2 105 | object-curly-spacing: [2, always] 106 | one-var: [2, never] 107 | operator-assignment: [2, always] 108 | operator-linebreak: [2, before] 109 | padded-blocks: [2, never] 110 | quote-props: [2, as-needed] 111 | quotes: [2, single, avoid-escape] 112 | radix: 2 113 | semi: [2, always] 114 | semi-spacing: [2, { before: false, after: true }] 115 | space-after-keywords: [2, always] 116 | space-before-blocks: [2, always] 117 | space-before-function-paren: [2, never] 118 | space-in-parens: [2, never] 119 | space-infix-ops: 2 120 | space-return-throw-case: 2 121 | space-unary-ops: [2, { words: true, nonwords: false }] 122 | spaced-comment: [2, always, { exceptions: ['!'] }] 123 | strict: [0, global] # TODO: Change to error 124 | use-isnan: 2 125 | valid-jsdoc: [0, { requireReturn: false }] # TODO: Change to warning 126 | valid-typeof: 2 127 | vars-on-top: 0 128 | wrap-iife: 2 129 | wrap-regex: 2 130 | yoda: [2, never] 131 | -------------------------------------------------------------------------------- /bloomfilter.js: -------------------------------------------------------------------------------- 1 | (function(exports) { 2 | 'use strict'; 3 | 4 | exports.BloomFilter = BloomFilter; 5 | 6 | /** 7 | * Two hashes are given for you! 8 | */ 9 | exports.hash1 = fnv_1a; 10 | exports.hash2 = fnv_1a_b; 11 | 12 | /** 13 | * Code originally from bloomfilter.js by Jason Davies: 14 | * https://github.com/jasondavies/bloomfilter.js/ 15 | * 16 | * London JS Algorithms Study Group presentation: 17 | * https://shane-tomlinson.github.io/bloomfilter-presentation/ 18 | * 19 | * MDN bit operations: 20 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators 21 | * 22 | * An approachable explanation: 23 | * http://www.michaelnielsen.org/ddi/why-bloom-filters-work-the-way-they-do/ 24 | * 25 | * A great survey of the math behind filters, and their uses: 26 | * https://www.eecs.harvard.edu/~michaelm/postscripts/im2005b.pdf 27 | */ 28 | 29 | /** 30 | * Create a new Bloom Filter 31 | * 32 | * @param {integer} m - total number of bits in the hash table 33 | * @param {integer} k - number of hashing functions to use 34 | */ 35 | function BloomFilter(m, k) { 36 | // hint, round the number of buckets up to the nearest 32. 37 | } 38 | 39 | /** 40 | * Hash `v` `k` times 41 | * 42 | * @param {variant} v 43 | * @returns [array of numbers] 44 | */ 45 | BloomFilter.prototype.locations = function(v) { 46 | // hint, see 47 | // https://willwhim.wpengine.com/2011/09/03/producing-n-hash-functions-by-hashing-only-once/ 48 | }; 49 | 50 | /** 51 | * Add an item to the filter 52 | * 53 | * @param {variant} v 54 | */ 55 | BloomFilter.prototype.add = function(v) { 56 | }; 57 | 58 | /** 59 | * Test if an item is in the filter 60 | * 61 | * @param {variant} v 62 | * @returns {boolean} 63 | */ 64 | BloomFilter.prototype.test = function(v) { 65 | }; 66 | 67 | /** 68 | * Create a new Bloomfilter that is the union of this filter 69 | * plus another. 70 | * 71 | * @param {BloomFilter} filter 72 | * @returns {BloomFilter} 73 | */ 74 | BloomFilter.prototype.union = function(filter) { 75 | }; 76 | 77 | /** 78 | * Create a new Bloomfilter that is the intersection of this 79 | * filter plus another 80 | * 81 | * @param {BloomFilter} filter 82 | * @returns {BloomFilter} 83 | */ 84 | BloomFilter.prototype.intersection = function(filter) { 85 | }; 86 | 87 | /************************* 88 | * 89 | * HELPERS! 90 | * 91 | */ 92 | 93 | /** 94 | * Fowler/Noll/Vo hashing. See 95 | * https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash. 96 | * For offset basis, see 97 | * http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param 98 | * 99 | * @param {string} string to hash 100 | * @returns 32bit signed int 101 | */ 102 | 103 | //https://gist.githubusercontent.com/vaiorabbit/5657561/raw/8ba52a3e13ad1d0cbf7c18bb93919120f09a8f02/fnv32a.js 104 | function fnv_1a(str) 105 | { 106 | var FNV1_32A_INIT = 0x811c9dc5; 107 | var hval = FNV1_32A_INIT; 108 | for ( var i = 0; i < str.length; ++i ) 109 | { 110 | hval ^= str.charCodeAt(i); 111 | hval = fnv_multiply(hval); 112 | } 113 | // ensure result is a 32 bit signed int 114 | return hval >>> 0; 115 | } 116 | 117 | /** 118 | * Multiply two FNV results 119 | * a * 16777619 mod 2**32 120 | * 121 | * @returns 32bit signed int 122 | */ 123 | function fnv_multiply(a) { 124 | var result = a + (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24); 125 | // ensure result is a 32 bit signed int 126 | return result >>> 0; 127 | } 128 | 129 | /** 130 | * One additional iteration of FNV, given a hash value. 131 | * 132 | * @param {32bit signed in} 133 | * @returns 32bit signed int 134 | */ 135 | function fnv_1a_b(a) { 136 | var result = fnv_mix(fnv_multiply(a)); 137 | return result; 138 | } 139 | 140 | // See https://web.archive.org/web/20131019013225/http://home.comcast.net/~bretm/hash/6.html 141 | function fnv_mix(a) { 142 | a += a << 13; 143 | a ^= a >>> 7; 144 | a += a << 3; 145 | a ^= a >>> 17; 146 | a += a << 5; 147 | 148 | return a >>> 0; 149 | } 150 | 151 | })(typeof exports !== "undefined" ? exports : this); 152 | -------------------------------------------------------------------------------- /bower_components/chai/README.md: -------------------------------------------------------------------------------- 1 | [![Chai Documentation](http://chaijs.com/public/img/chai-logo.png)](http://chaijs.com) 2 | 3 | [![license:mit](https://img.shields.io/badge/license-mit-green.svg?style=flat-square)](#license)
4 | [![tag:?](https://img.shields.io/github/tag/chaijs/chai.svg?style=flat-square)](https://github.com/chaijs/chai/releases) 5 | [![build:?](https://img.shields.io/travis/chaijs/chai/master.svg?style=flat-square)](https://travis-ci.org/chaijs/chai) 6 | [![coverage:?](https://img.shields.io/coveralls/chaijs/chai/master.svg?style=flat-square)](https://coveralls.io/r/chaijs/chai)
7 | [![npm:](https://img.shields.io/npm/v/chai.svg?style=flat-square)](https://www.npmjs.com/packages/chai) 8 | [![dependencies:?](https://img.shields.io/npm/dm/chai.svg?style=flat-square)](https://www.npmjs.com/packages/chai) 9 | [![devDependencies:?](https://img.shields.io/david/chaijs/chai.svg?style=flat-square)](https://david-dm.org/chaijs/chai) 10 | 11 | [![Selenium Test Status](https://saucelabs.com/browser-matrix/chaijs.svg)](https://saucelabs.com/u/chaijs) 12 | 13 | [![Slack Status](https://chai-slack.herokuapp.com/badge.svg)]( https://chai-slack.herokuapp.com/) 14 | [![Join the chat at https://gitter.im/chaijs/chai](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/chaijs/chai) 15 | 16 | Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that 17 | can be delightfully paired with any javascript testing framework. 18 | 19 | For more information or to download plugins, view the [documentation](http://chaijs.com). 20 | 21 | ### Plugins 22 | 23 | Chai offers a robust Plugin architecture for extending Chai's assertions and interfaces. 24 | 25 | - Need a plugin? View the [official plugin list](http://chaijs.com/plugins). 26 | - Have a plugin and want it listed? Open a Pull Request at [chaijs/chai-docs:plugin.js](https://github.com/chaijs/chai-docs/blob/master/plugins.js#L1-L12). 27 | - Want to build a plugin? Read the [plugin api documentation](http://chaijs.com/guide/plugins/). 28 | 29 | ### Related Projects 30 | 31 | - [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing. 32 | - [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser. 33 | - [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for node.js and the browser. 34 | 35 | ### Contributing 36 | 37 | Thank you very much for considering to contribute! 38 | 39 | Here are a few issues other contributors frequently ran into when opening pull requests: 40 | 41 | - Please do not commit changes to the `chai.js` build. We do it once per release. 42 | - Before pushing your commits, please make sure you [rebase](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md#pull-requests) them. 43 | 44 | We also strongly encourage you to read our detailed [contribution guidelines](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md). 45 | 46 | ### Contributors 47 | 48 | Please see the full 49 | [Contributors Graph](https://github.com/chaijs/chai/graphs/contributors) for our 50 | list of contributors. 51 | 52 | ### Core Contributors 53 | 54 | Feel free to reach out to any of the core contributors with your questions or 55 | concerns. We will do our best to respond in a timely manner. 56 | 57 | [![Jake Luer](https://avatars3.githubusercontent.com/u/58988?v=3&s=50)](https://github.com/logicalparadox) 58 | [![Veselin Todorov](https://avatars3.githubusercontent.com/u/330048?v=3&s=50)](https://github.com/vesln) 59 | [![Keith Cirkel](https://avatars3.githubusercontent.com/u/118266?v=3&s=50)](https://github.com/keithamus) 60 | 61 | ## License 62 | 63 | (The MIT License) 64 | 65 | Copyright (c) 2011-2015 Jake Luer 66 | 67 | Permission is hereby granted, free of charge, to any person obtaining a copy 68 | of this software and associated documentation files (the "Software"), to deal 69 | in the Software without restriction, including without limitation the rights 70 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 71 | copies of the Software, and to permit persons to whom the Software is 72 | furnished to do so, subject to the following conditions: 73 | 74 | The above copyright notice and this permission notice shall be included in 75 | all copies or substantial portions of the Software. 76 | 77 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 78 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 79 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 80 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 81 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 82 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 83 | THE SOFTWARE. 84 | -------------------------------------------------------------------------------- /bower_components/mocha/mocha.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | body { 4 | margin:0; 5 | } 6 | 7 | #mocha { 8 | font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; 9 | margin: 60px 50px; 10 | } 11 | 12 | #mocha ul, 13 | #mocha li { 14 | margin: 0; 15 | padding: 0; 16 | } 17 | 18 | #mocha ul { 19 | list-style: none; 20 | } 21 | 22 | #mocha h1, 23 | #mocha h2 { 24 | margin: 0; 25 | } 26 | 27 | #mocha h1 { 28 | margin-top: 15px; 29 | font-size: 1em; 30 | font-weight: 200; 31 | } 32 | 33 | #mocha h1 a { 34 | text-decoration: none; 35 | color: inherit; 36 | } 37 | 38 | #mocha h1 a:hover { 39 | text-decoration: underline; 40 | } 41 | 42 | #mocha .suite .suite h1 { 43 | margin-top: 0; 44 | font-size: .8em; 45 | } 46 | 47 | #mocha .hidden { 48 | display: none; 49 | } 50 | 51 | #mocha h2 { 52 | font-size: 12px; 53 | font-weight: normal; 54 | cursor: pointer; 55 | } 56 | 57 | #mocha .suite { 58 | margin-left: 15px; 59 | } 60 | 61 | #mocha .test { 62 | margin-left: 15px; 63 | overflow: hidden; 64 | } 65 | 66 | #mocha .test.pending:hover h2::after { 67 | content: '(pending)'; 68 | font-family: arial, sans-serif; 69 | } 70 | 71 | #mocha .test.pass.medium .duration { 72 | background: #c09853; 73 | } 74 | 75 | #mocha .test.pass.slow .duration { 76 | background: #b94a48; 77 | } 78 | 79 | #mocha .test.pass::before { 80 | content: '✓'; 81 | font-size: 12px; 82 | display: block; 83 | float: left; 84 | margin-right: 5px; 85 | color: #00d6b2; 86 | } 87 | 88 | #mocha .test.pass .duration { 89 | font-size: 9px; 90 | margin-left: 5px; 91 | padding: 2px 5px; 92 | color: #fff; 93 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); 94 | -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); 95 | box-shadow: inset 0 1px 1px rgba(0,0,0,.2); 96 | -webkit-border-radius: 5px; 97 | -moz-border-radius: 5px; 98 | -ms-border-radius: 5px; 99 | -o-border-radius: 5px; 100 | border-radius: 5px; 101 | } 102 | 103 | #mocha .test.pass.fast .duration { 104 | display: none; 105 | } 106 | 107 | #mocha .test.pending { 108 | color: #0b97c4; 109 | } 110 | 111 | #mocha .test.pending::before { 112 | content: '◦'; 113 | color: #0b97c4; 114 | } 115 | 116 | #mocha .test.fail { 117 | color: #c00; 118 | } 119 | 120 | #mocha .test.fail pre { 121 | color: black; 122 | } 123 | 124 | #mocha .test.fail::before { 125 | content: '✖'; 126 | font-size: 12px; 127 | display: block; 128 | float: left; 129 | margin-right: 5px; 130 | color: #c00; 131 | } 132 | 133 | #mocha .test pre.error { 134 | color: #c00; 135 | max-height: 300px; 136 | overflow: auto; 137 | } 138 | 139 | #mocha .test .html-error { 140 | overflow: auto; 141 | color: black; 142 | line-height: 1.5; 143 | display: block; 144 | float: left; 145 | clear: left; 146 | font: 12px/1.5 monaco, monospace; 147 | margin: 5px; 148 | padding: 15px; 149 | border: 1px solid #eee; 150 | max-width: 85%; /*(1)*/ 151 | max-width: calc(100% - 42px); /*(2)*/ 152 | max-height: 300px; 153 | word-wrap: break-word; 154 | border-bottom-color: #ddd; 155 | -webkit-border-radius: 3px; 156 | -webkit-box-shadow: 0 1px 3px #eee; 157 | -moz-border-radius: 3px; 158 | -moz-box-shadow: 0 1px 3px #eee; 159 | border-radius: 3px; 160 | } 161 | 162 | #mocha .test .html-error pre.error { 163 | border: none; 164 | -webkit-border-radius: none; 165 | -webkit-box-shadow: none; 166 | -moz-border-radius: none; 167 | -moz-box-shadow: none; 168 | padding: 0; 169 | margin: 0; 170 | margin-top: 18px; 171 | max-height: none; 172 | } 173 | 174 | /** 175 | * (1): approximate for browsers not supporting calc 176 | * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border) 177 | * ^^ seriously 178 | */ 179 | #mocha .test pre { 180 | display: block; 181 | float: left; 182 | clear: left; 183 | font: 12px/1.5 monaco, monospace; 184 | margin: 5px; 185 | padding: 15px; 186 | border: 1px solid #eee; 187 | max-width: 85%; /*(1)*/ 188 | max-width: calc(100% - 42px); /*(2)*/ 189 | word-wrap: break-word; 190 | border-bottom-color: #ddd; 191 | -webkit-border-radius: 3px; 192 | -webkit-box-shadow: 0 1px 3px #eee; 193 | -moz-border-radius: 3px; 194 | -moz-box-shadow: 0 1px 3px #eee; 195 | border-radius: 3px; 196 | } 197 | 198 | #mocha .test h2 { 199 | position: relative; 200 | } 201 | 202 | #mocha .test a.replay { 203 | position: absolute; 204 | top: 3px; 205 | right: 0; 206 | text-decoration: none; 207 | vertical-align: middle; 208 | display: block; 209 | width: 15px; 210 | height: 15px; 211 | line-height: 15px; 212 | text-align: center; 213 | background: #eee; 214 | font-size: 15px; 215 | -moz-border-radius: 15px; 216 | border-radius: 15px; 217 | -webkit-transition: opacity 200ms; 218 | -moz-transition: opacity 200ms; 219 | transition: opacity 200ms; 220 | opacity: 0.3; 221 | color: #888; 222 | } 223 | 224 | #mocha .test:hover a.replay { 225 | opacity: 1; 226 | } 227 | 228 | #mocha-report.pass .test.fail { 229 | display: none; 230 | } 231 | 232 | #mocha-report.fail .test.pass { 233 | display: none; 234 | } 235 | 236 | #mocha-report.pending .test.pass, 237 | #mocha-report.pending .test.fail { 238 | display: none; 239 | } 240 | #mocha-report.pending .test.pass.pending { 241 | display: block; 242 | } 243 | 244 | #mocha-error { 245 | color: #c00; 246 | font-size: 1.5em; 247 | font-weight: 100; 248 | letter-spacing: 1px; 249 | } 250 | 251 | #mocha-stats { 252 | position: fixed; 253 | top: 15px; 254 | right: 10px; 255 | font-size: 12px; 256 | margin: 0; 257 | color: #888; 258 | z-index: 1; 259 | } 260 | 261 | #mocha-stats .progress { 262 | float: right; 263 | padding-top: 0; 264 | } 265 | 266 | #mocha-stats em { 267 | color: black; 268 | } 269 | 270 | #mocha-stats a { 271 | text-decoration: none; 272 | color: inherit; 273 | } 274 | 275 | #mocha-stats a:hover { 276 | border-bottom: 1px solid #eee; 277 | } 278 | 279 | #mocha-stats li { 280 | display: inline-block; 281 | margin: 0 5px; 282 | list-style: none; 283 | padding-top: 11px; 284 | } 285 | 286 | #mocha-stats canvas { 287 | width: 40px; 288 | height: 40px; 289 | } 290 | 291 | #mocha code .comment { color: #ddd; } 292 | #mocha code .init { color: #2f6fad; } 293 | #mocha code .string { color: #5890ad; } 294 | #mocha code .keyword { color: #8a6343; } 295 | #mocha code .number { color: #2f6fad; } 296 | 297 | @media screen and (max-device-width: 480px) { 298 | #mocha { 299 | margin: 60px 0px; 300 | } 301 | 302 | #mocha #stats { 303 | position: absolute; 304 | } 305 | } 306 | -------------------------------------------------------------------------------- /test/bloomfilter-test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const BloomFilter = window.BloomFilter; 4 | const assert = window.chai.assert; 5 | const fnv_1a = window.fnv_1a; 6 | const fnv_1a_b = window.fnv_1a_b; 7 | 8 | const BITS = 1000; 9 | const HASHING_FUNCTIONS = 5; 10 | 11 | const JABBERWOCKY = "`Twas brillig, and the slithy toves\n Did gyre and gimble in the wabe:\nAll mimsy were the borogoves,\n And the mome raths outgrabe.\n\n\"Beware the Jabberwock, my son!\n The jaws that bite, the claws that catch!\nBeware the Jubjub bird, and shun\n The frumious Bandersnatch!\"\n\nHe took his vorpal sword in hand:\n Long time the manxome foe he sought --\nSo rested he by the Tumtum tree,\n And stood awhile in thought.\n\nAnd, as in uffish thought he stood,\n The Jabberwock, with eyes of flame,\nCame whiffling through the tulgey wood,\n And burbled as it came!\n\nOne, two! One, two! And through and through\n The vorpal blade went snicker-snack!\nHe left it dead, and with its head\n He went galumphing back.\n\n\"And, has thou slain the Jabberwock?\n Come to my arms, my beamish boy!\nO frabjous day! Callooh! Callay!'\n He chortled in his joy.\n\n`Twas brillig, and the slithy toves\n Did gyre and gimble in the wabe;\nAll mimsy were the borogoves,\n And the mome raths outgrabe."; 12 | const JABBER_WORDS = JABBERWOCKY.split(/\s+/).map((word) => { 13 | return word.replace(/[\.`"',;\s!-]/g, ''); 14 | }).filter((word) => { 15 | return word.length; 16 | }); 17 | 18 | describe('bloomfilter', () => { 19 | describe('initialization', () => { 20 | let filter; 21 | 22 | before(() => { 23 | filter = new BloomFilter(BITS, HASHING_FUNCTIONS); 24 | }); 25 | 26 | it('sets all bits to 0', () => { 27 | filter.buckets.forEach((bucket) => { 28 | assert.equal(bucket, 0); 29 | }); 30 | }); 31 | }); 32 | 33 | describe('locations (test one hash)', () => { 34 | let locations; 35 | 36 | beforeEach(() => { 37 | let filter = new BloomFilter(BITS, 1); 38 | locations = filter.locations(JABBERWOCKY); 39 | }); 40 | 41 | it('returns the correct number of values', () => { 42 | assert.lengthOf(locations, 1); 43 | }); 44 | 45 | it('returns value >= 0', () => { 46 | assert.ok(locations[0] >= 0); 47 | }); 48 | }); 49 | 50 | describe('locations (test 2 hashes)', () => { 51 | let locations; 52 | let hashFunctions = 2 53 | 54 | beforeEach(() => { 55 | let filter = new BloomFilter(BITS, hashFunctions); 56 | locations = filter.locations(JABBERWOCKY); 57 | }); 58 | 59 | it('returns the correct number of values', () => { 60 | assert.lengthOf(locations, hashFunctions); 61 | }); 62 | 63 | it('returns values all >= 0', () => { 64 | locations.forEach((location) => { 65 | assert.ok(location >= 0); 66 | }); 67 | }); 68 | 69 | it('returns all unique values', () => { 70 | let unique = locations.reduce((unique, value) => { 71 | if (unique.indexOf(value) === -1) { 72 | unique.push(value); 73 | } 74 | 75 | return unique; 76 | }, []); 77 | 78 | assert.equal(unique.length, hashFunctions); 79 | }); 80 | }); 81 | 82 | describe('locations (test arbitrary k)', () => { 83 | let locations; 84 | 85 | beforeEach(() => { 86 | let filter = new BloomFilter(BITS, HASHING_FUNCTIONS); 87 | locations = filter.locations(JABBERWOCKY); 88 | }); 89 | 90 | it('returns the correct number of values', () => { 91 | assert.lengthOf(locations, HASHING_FUNCTIONS); 92 | }); 93 | 94 | it('returns values all >= 0', () => { 95 | locations.forEach((location) => { 96 | assert.ok(location >= 0); 97 | }); 98 | }); 99 | 100 | it('returns all unique values', () => { 101 | let unique = locations.reduce((unique, value) => { 102 | if (unique.indexOf(value) === -1) { 103 | unique.push(value); 104 | } 105 | 106 | return unique; 107 | }, []); 108 | 109 | assert.equal(unique.length, HASHING_FUNCTIONS); 110 | }); 111 | }); 112 | 113 | describe('add/test', () => { 114 | describe('basic', () => { 115 | let filter; 116 | let n1 = "Bess"; 117 | let n2 = "Jane"; 118 | 119 | before(() => { 120 | filter = new BloomFilter(BITS, HASHING_FUNCTIONS); 121 | filter.add(n1); 122 | }); 123 | 124 | it('finds items in the set', () => { 125 | assert.isTrue(filter.test(n1)); 126 | }); 127 | 128 | it('does not find items not in the set', () => { 129 | assert.isFalse(filter.test(n2)); 130 | }); 131 | }); 132 | 133 | describe('with jabberwocky', () => { 134 | let filter; 135 | let n1 = JABBERWOCKY; 136 | let n2 = JABBERWOCKY + "\n"; 137 | 138 | before(() => { 139 | filter = new BloomFilter(BITS, HASHING_FUNCTIONS); 140 | filter.add(n1); 141 | }); 142 | 143 | it('finds items in the set', () => { 144 | assert.isTrue(filter.test(n1)); 145 | }); 146 | 147 | it('does not find items not in the set', () => { 148 | assert.isFalse(filter.test(n2)); 149 | }); 150 | }); 151 | 152 | describe('wtf', () => { 153 | let filter; 154 | 155 | before(() => { 156 | filter = new BloomFilter(20, 10); 157 | filter.add("abc"); 158 | }); 159 | 160 | it('does not find wtf', () => { 161 | assert.isFalse(filter.test("wtf")); 162 | }); 163 | }); 164 | 165 | describe('with uint32', () => { 166 | let filter; 167 | let n1 = "\u0100"; 168 | let n2 = "\u0101"; 169 | let n3 = "\u0103"; 170 | 171 | before(() => { 172 | filter = new BloomFilter(BITS, HASHING_FUNCTIONS); 173 | filter.add(n1); 174 | }); 175 | 176 | it('finds items in the set', () => { 177 | assert.isTrue(filter.test(n1)); 178 | }); 179 | 180 | it('does not find items not in the set', () => { 181 | assert.isFalse(filter.test(n2)); 182 | assert.isFalse(filter.test(n3)); 183 | }); 184 | }); 185 | 186 | describe("with integers ", () => { 187 | let filter; 188 | 189 | before(() => { 190 | filter = new BloomFilter(BITS, HASHING_FUNCTIONS); 191 | filter.add(1); 192 | }); 193 | 194 | it('finds items in the set', () => { 195 | assert.isTrue(filter.test(1)); 196 | }); 197 | 198 | it('does not find items not in the set', () => { 199 | assert.isFalse(filter.test(2)); 200 | }); 201 | }); 202 | }); 203 | 204 | describe('union', () => { 205 | let unionFilter; 206 | 207 | before(() => { 208 | let copy = [].concat(JABBER_WORDS); 209 | let firstHalf = copy.splice(0, JABBER_WORDS.length / 2); 210 | let secondHalf = copy; 211 | 212 | let f1 = new BloomFilter(BITS, HASHING_FUNCTIONS); 213 | let f2 = new BloomFilter(BITS, HASHING_FUNCTIONS); 214 | 215 | firstHalf.forEach(f1.add.bind(f1)); 216 | secondHalf.forEach(f2.add.bind(f2)); 217 | 218 | unionFilter = f1.union(f2); 219 | }); 220 | 221 | it("returns a new filter that's the union of both", () => { 222 | JABBER_WORDS.forEach((word) => { 223 | assert.isTrue(unionFilter.test(word)); 224 | }); 225 | 226 | assert.isFalse(unionFilter.test("asdf")); 227 | assert.isFalse(unionFilter.test("brilligs")); 228 | }); 229 | }); 230 | 231 | describe('intersection', () => { 232 | let intersectionFilter; 233 | 234 | before(() => { 235 | let copy = [].concat(JABBER_WORDS); 236 | let firstHalf = copy.splice(0, JABBER_WORDS.length / 2); 237 | let secondHalf = copy; 238 | 239 | let f1 = new BloomFilter(BITS, HASHING_FUNCTIONS); 240 | let f2 = new BloomFilter(BITS, HASHING_FUNCTIONS); 241 | 242 | firstHalf.forEach(f1.add.bind(f1)); 243 | secondHalf.forEach(f2.add.bind(f2)); 244 | 245 | intersectionFilter = f1.intersection(f2); 246 | }); 247 | 248 | it("returns a new filter that's the interesection of both", () => { 249 | assert.isTrue(intersectionFilter.test("gimble")); 250 | assert.isFalse(intersectionFilter.test("frumious")); 251 | assert.isFalse(intersectionFilter.test("asdf")); 252 | }); 253 | }); 254 | }); 255 | 256 | -------------------------------------------------------------------------------- /bower_components/chai/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Chai Contribution Guidelines 2 | 3 | We like to encourage you to contribute to the Chai.js repository. This should be as easy as possible for you but there are a few things to consider when contributing. The following guidelines for contribution should be followed if you want to submit a pull request or open an issue. 4 | 5 | Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features. 6 | 7 | #### Table of Contents 8 | 9 | - [TLDR;](#tldr) 10 | - [Contributing](#contributing) 11 | - [Bug Reports](#bugs) 12 | - [Feature Requests](#features) 13 | - [Pull Requests](#pull-requests) 14 | - [Releasing](#releasing) 15 | - [Support](#support) 16 | - [Resources](#resources) 17 | - [Core Contributors](#contributors) 18 | 19 | 20 | ## TLDR; 21 | 22 | - Creating an Issue or Pull Request requires a [GitHub](http://github.com) account. 23 | - Issue reports should be **clear**, **concise** and **reproducible**. Check to see if your issue has already been resolved in the [master]() branch or already reported in Chai's [GitHub Issue Tracker](https://github.com/chaijs/chai/issues). 24 | - Pull Requests must adhere to strict [coding style guidelines](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide). 25 | - In general, avoid submitting PRs for new Assertions without asking core contributors first. More than likely it would be better implemented as a plugin. 26 | - Additional support is available via the [Google Group](http://groups.google.com/group/chaijs) or on irc.freenode.net#chaijs. 27 | - **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. 28 | 29 | 30 | 31 | 32 | ## Contributing 33 | 34 | The issue tracker is the preferred channel for [bug reports](#bugs), 35 | [feature requests](#features) and [submitting pull 36 | requests](#pull-requests), but please respect the following restrictions: 37 | 38 | * Please **do not** use the issue tracker for personal support requests (use 39 | [Google Group](https://groups.google.com/forum/#!forum/chaijs) or IRC). 40 | * Please **do not** derail or troll issues. Keep the discussion on topic and 41 | respect the opinions of others 42 | 43 | 44 | ### Bug Reports 45 | 46 | A bug is a **demonstrable problem** that is caused by the code in the repository. 47 | 48 | Guidelines for bug reports: 49 | 50 | 1. **Use the GitHub issue search** — check if the issue has already been reported. 51 | 2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository. 52 | 3. **Isolate the problem** — create a test case to demonstrate your issue. Provide either a repo, gist, or code sample to demonstrate you problem. 53 | 54 | A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and/or Node.js versions experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs. 55 | 56 | Example: 57 | 58 | > Short and descriptive example bug report title 59 | > 60 | > A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug. 61 | > 62 | > 1. This is the first step 63 | > 2. This is the second step 64 | > 3. Further steps, etc. 65 | > 66 | > `` - a link to the reduced test case OR 67 | > ```js 68 | > expect(a).to.equal('a'); 69 | > // code sample 70 | > ``` 71 | > 72 | > Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits). 73 | 74 | 75 | ### Feature Requests 76 | 77 | Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. 78 | 79 | Furthermore, since Chai.js has a [robust plugin API](http://chaijs.com/guide/plugins/), we encourage you to publish **new Assertions** as plugins. If your feature is an enhancement to an **existing Assertion**, please propose your changes as an issue prior to opening a pull request. If the core Chai.js contributors feel your plugin would be better suited as a core assertion, they will invite you to open a PR in [chaijs/chai](https://github.com/chaijs/chai). 80 | 81 | 82 | ### Pull Requests 83 | 84 | - PRs for new core-assertions are advised against. 85 | - PRs for core-assertion bug fixes are always welcome. 86 | - PRs for enhancing the interfaces are always welcome. 87 | - PRs that increase test coverage are always welcome. 88 | - PRs are scrutinized for coding-style. 89 | 90 | Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. 91 | 92 | **Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. 93 | 94 | Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Please review the [Chai.js Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide). 95 | 96 | Follow this process if you'd like your work considered for inclusion in the project: 97 | 98 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: 99 | 100 | ```bash 101 | # Clone your fork of the repo into the current directory 102 | git clone https://github.com// 103 | # Navigate to the newly cloned directory 104 | cd 105 | # Assign the original repo to a remote called "upstream" 106 | git remote add upstream https://github.com// 107 | ``` 108 | 109 | 2. If you cloned a while ago, get the latest changes from upstream: 110 | 111 | ```bash 112 | git checkout 113 | git pull upstream 114 | ``` 115 | 116 | 3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: 117 | 118 | ```bash 119 | git checkout -b 120 | ``` 121 | 122 | 4. Commit your changes in logical chunks. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. 123 | 124 | 5. Run you code to make sure it works. If you're still having problems please try to run `make clean` and then test your code again. 125 | 126 | ```bash 127 | npm test 128 | # when finished running tests... 129 | git checkout chai.js 130 | ``` 131 | 132 | 6. Locally merge (or rebase) the upstream development branch into your topic branch: 133 | 134 | ```bash 135 | git pull [--rebase] upstream 136 | ``` 137 | 138 | 7. Push your topic branch up to your fork: 139 | 140 | ```bash 141 | git push origin 142 | ``` 143 | 144 | 8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. 145 | 146 | **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. 147 | 148 | 149 | ## Releasing 150 | 151 | Releases can be **prepared** by anyone with access to the code. 152 | 153 | Simply run `make release-major`, `make release-minor`, or `make-release-patch` 154 | and it will automatically do the following: 155 | 156 | - Build chai.js 157 | - Bump the version numbers accross the project 158 | - Make a commit within git 159 | 160 | All you need to do is push the commit up and make a pull request, one of the core contributors will merge it and publish a release. 161 | 162 | ### Publishing a Release 163 | 164 | Anyone who is a core contributor (see the [Core Contributors Heading in the Readme](https://github.com/chaijs/chai#core-contributors)) can publish a release: 165 | 166 | 1. Go to te [Releases page on Github](https://github.com/chaijs/chai/releases) 167 | 2. Hit "Draft a new release" (if you can't see this, you're not a core contributor!) 168 | 3. Write human-friendly Release Notes based on changelog. 169 | - The release title is "x.x.x / YYYY-MM-DD" (where x.x.x is the version number) 170 | - If breaking changes, write migration tutorial(s) and reasoning. 171 | - Callouts for community contributions (PRs) with links to PR and contributing user. 172 | - Callouts for other fixes made by core contributors with links to issue. 173 | 4. Hit "Save Draft" and get other core contributors to check your work, or alternatively hit "Publish release" 174 | 5. That's it! 175 | 176 | 177 | ## Support 178 | 179 | 180 | ### Resources 181 | 182 | For most of the documentation you are going to want to visit [ChaiJS.com](http://chaijs.com). 183 | 184 | - [Getting Started Guide](http://chaijs.com/guide/) 185 | - [API Reference](http://chaijs.com/api/) 186 | - [Plugins](http://chaijs.com/plugins/) 187 | 188 | Alternatively, the [wiki](https://github.com/chaijs/chai/wiki) might be what you are looking for. 189 | 190 | - [Chai Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide) 191 | - [Third-party Resources](https://github.com/chaijs/chai/wiki/Third-Party-Resources) 192 | 193 | Or finally, you may find a core-contributor or like-minded developer in any of our support channels. 194 | 195 | - IRC: irc.freenode.org #chaijs 196 | - [Mailing List / Google Group](https://groups.google.com/forum/#!forum/chaijs) 197 | 198 | 199 | ### Core Contributors 200 | 201 | Feel free to reach out to any of the core-contributors with you questions or concerns. We will do our best to respond in a timely manner. 202 | 203 | - Jake Luer 204 | - GH: [@logicalparadox](https://github.com/logicalparadox) 205 | - TW: [@jakeluer](http://twitter.com/jakeluer) 206 | - IRC: logicalparadox 207 | - Veselin Todorov 208 | - GH: [@vesln](https://github.com/vesln/) 209 | - TW: [@vesln](http://twitter.com/vesln) 210 | - IRC: vesln 211 | - Keith Cirkel 212 | - GH: [@keithamus](https://github.com/keithamus) 213 | - TW: [@keithamus](http://twitter.com/keithamus) 214 | - IRC: keithamus 215 | -------------------------------------------------------------------------------- /bower_components/chai/ReleaseNotes.md: -------------------------------------------------------------------------------- 1 | # Release Notes 2 | 3 | ## Note 4 | 5 | As of 3.0.0, the ReleaseNotes.md file has been deprecated. [Please refer to the release notes available on Github](https://github.com/chaijs/chai/releases). Or 6 | [the release notes on the chaijs.com website](https://chaijs.com/releases). 7 | 8 | --- 9 | 10 | ## 2.3.0 / 2015-04-26 11 | 12 | Added `ownPropertyDescriptor` assertion: 13 | 14 | ```js 15 | expect('test').to.have.ownPropertyDescriptor('length'); 16 | expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 }); 17 | expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 }); 18 | expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false); 19 | expect('test').ownPropertyDescriptor('length').to.have.keys('value'); 20 | ``` 21 | 22 | ### Community Contributions 23 | 24 | #### Code Features & Fixes 25 | 26 | * [#408](https://github.com/chaijs/chai/pull/408) Add `ownPropertyDescriptor` 27 | assertion. 28 | By [@ljharb](https://github.com/ljharb) 29 | * [#422](https://github.com/chaijs/chai/pull/422) Improve ownPropertyDescriptor 30 | tests. 31 | By [@ljharb](https://github.com/ljharb) 32 | 33 | #### Documentation fixes 34 | 35 | * [#417](https://github.com/chaijs/chai/pull/417) Fix documentation typo 36 | By [@astorije](https://github.com/astorije) 37 | * [#423](https://github.com/chaijs/chai/pull/423) Fix inconsistency in docs. 38 | By [@ehntoo](https://github.com/ehntoo) 39 | 40 | 41 | ## 2.2.0 / 2015-03-26 42 | 43 | Deep property strings can now be escaped using `\\` - for example: 44 | 45 | ```js 46 | var deepCss = { '.link': { '[target]': 42 }}; 47 | expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42) 48 | ``` 49 | 50 | ### Community Contributions 51 | 52 | #### Code Features & Fixes 53 | 54 | * [#402](https://github.com/chaijs/chai/pull/402) Allow escaping of deep 55 | property keys. 56 | By [@umireon](https://github.com/umireon) 57 | 58 | #### Documentation fixes 59 | 60 | * [#405](https://github.com/chaijs/chai/pull/405) Tweak documentation around 61 | deep property escaping. 62 | By [@keithamus](https://github.com/keithamus) 63 | 64 | 65 | ## 2.1.2 / 2015-03-15 66 | 67 | A minor bug fix. No new features. 68 | 69 | ### Community Contributions 70 | 71 | #### Code Features & Fixes 72 | 73 | * [#395](https://github.com/chaijs/chai/pull/395) Fix eval-related bugs with 74 | assert.operator ([#386](https://github.com/chaijs/chai/pull/386)). 75 | By [@cjqed](https://github.com/cjqed) 76 | 77 | ## 2.1.1 / 2015-03-04 78 | 79 | Two minor bugfixes. No new features. 80 | 81 | ### Community Contributions 82 | 83 | #### Code Features & Fixes 84 | 85 | * [#385](https://github.com/chaijs/chai/pull/385) Fix a bug (also described in 86 | [#387](https://github.com/chaijs/chai/pull/385)) where `deep.property` would not work with single 87 | key names. By [@eldritch-fossicker](https://github.com/eldritch-fossicker) 88 | * [#379](https://github.com/chaijs/chai/pull/379) Fix bug where tools which overwrite 89 | primitive prototypes, such as Babel or core-js would fail. 90 | By [@dcneiner](https://github.com/dcneiner) 91 | 92 | #### Documentation fixes 93 | 94 | * [#382](https://github.com/chaijs/chai/pull/382) Add doc for showDiff argument in assert. 95 | By [@astorije](https://github.com/astorije) 96 | * [#383](https://github.com/chaijs/chai/pull/383) Improve wording for truncateTreshold docs 97 | By [@gurdiga](https://github.com/gurdiga) 98 | * [#381](https://github.com/chaijs/chai/pull/381) Improve wording for assert.empty docs 99 | By [@astorije](https://github.com/astorije) 100 | 101 | ## 2.1.0 / 2015-02-23 102 | 103 | Small release; fixes an issue where the Chai lib was incorrectly reporting the 104 | version number. 105 | 106 | Adds new `should.fail()` and `expect.fail()` methods, which are convinience 107 | methods to throw Assertion Errors. 108 | 109 | ### Community Contributions 110 | 111 | #### Code Features & Fixes 112 | 113 | * [#356](https://github.com/chaijs/chai/pull/356) Add should.fail(), expect.fail(). By [@Soviut](https://github.com/Soviut) 114 | * [#374](https://github.com/chaijs/chai/pull/374) Increment version. By [@jmm](https://github.com/jmm) 115 | 116 | ## 2.0.0 / 2015-02-09 117 | 118 | Unfortunately with 1.10.0 - compatibility broke with older versions because of 119 | the `addChainableNoop`. This change has been reverted. 120 | 121 | Any plugins using `addChainableNoop` should cease to do so. 122 | 123 | Any developers wishing for this behaviour can use [dirty-chai](https://www.npmjs.com/package/dirty-chai) 124 | by [@joshperry](https://github.com/joshperry) 125 | 126 | ### Community Contributions 127 | 128 | #### Code Features & Fixes 129 | 130 | * [#361](https://github.com/chaijs/chai/pull/361) `.keys()` now accepts Objects, extracting keys from them. By [@gregglind](https://github.com/gregglind) 131 | * [#359](https://github.com/chaijs/chai/pull/359) `.keys()` no longer mutates passed arrays. By [@gregglind](https://github.com/gregglind) 132 | * [#349](https://github.com/chaijs/chai/pull/349) Add a new chainable keyword - `.which`. By [@toastynerd](https://github.com/toastynerd) 133 | * [#333](https://github.com/chaijs/chai/pull/333) Add `.change`, `.increase` and `.decrease` assertions. By [@cmpolis](https://github.com/cmpolis) 134 | * [#335](https://github.com/chaijs/chai/pull/335) `chai.util` is now exposed [@DingoEatingFuzz](https://github.com/DingoEatingFuzz) 135 | * [#328](https://github.com/chaijs/chai/pull/328) Add `.includes` and `.contains` aliases (for `.include` and `.contain`). By [@lo1tuma](https://github.com/lo1tuma) 136 | * [#313](https://github.com/chaijs/chai/pull/313) Add `.any.keys()` and `.all.keys()` qualifiers. By [@cjqed](https://github.com/cjqed) 137 | * [#312](https://github.com/chaijs/chai/pull/312) Add `assert.sameDeepMembers()`. By [@cjqed](https://github.com/cjqed) 138 | * [#311](https://github.com/chaijs/chai/pull/311) Add `assert.isAbove()` and `assert.isBelow()`. By [@cjqed](https://github.com/cjqed) 139 | * [#308](https://github.com/chaijs/chai/pull/308) `property` and `deep.property` now pass if a value is set to `undefined`. By [@prodatakey](https://github.com/prodatakey) 140 | * [#309](https://github.com/chaijs/chai/pull/309) optimize deep equal in Arrays. By [@ericdouglas](https://github.com/ericdouglas) 141 | * [#306](https://github.com/chaijs/chai/pull/306) revert #297 - allowing lint-friendly tests. By [@keithamus](https://github.com/keithamus) 142 | 143 | #### Documentation fixes 144 | 145 | * [#357](https://github.com/chaijs/chai/pull/357) Copyright year updated in docs. By [@danilovaz](https://github.com/danilovaz) 146 | * [#325](https://github.com/chaijs/chai/pull/325) Fix documentation for overwriteChainableMethod. By [@chasenlehara](https://github.com/chasenlehara) 147 | * [#334](https://github.com/chaijs/chai/pull/334) Typo fix. By [@hurrymaplelad](https://github.com/hurrymaplelad) 148 | * [#317](https://github.com/chaijs/chai/pull/317) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) 149 | * [#318](https://github.com/chaijs/chai/pull/318) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) 150 | * [#316](https://github.com/chaijs/chai/pull/316) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) 151 | 152 | 153 | ## 1.10.0 / 2014-11-10 154 | 155 | The following changes are required if you are upgrading from the previous version: 156 | 157 | - **Users:** 158 | - No changes required 159 | - **Plugin Developers:** 160 | - Review `addChainableNoop` notes below. 161 | - **Core Contributors:** 162 | - Refresh `node_modules` folder for updated dependencies. 163 | 164 | ### Noop Function for Terminating Assertion Properties 165 | 166 | The following assertions can now also be used in the function-call form: 167 | 168 | * ok 169 | * true 170 | * false 171 | * null 172 | * undefined 173 | * exist 174 | * empty 175 | * arguments 176 | * Arguments 177 | 178 | The above list of assertions are property getters that assert immediately on 179 | access. Because of that, they were written to be used by terminating the assertion 180 | chain with a property access. 181 | 182 | ```js 183 | expect(true).to.be.true; 184 | foo.should.be.ok; 185 | ``` 186 | 187 | This syntax is definitely aesthetically pleasing but, if you are linting your 188 | test code, your linter will complain with an error something like "Expected an 189 | assignment or function call and instead saw an expression." Since the linter 190 | doesn't know about the property getter it assumes this line has no side-effects, 191 | and throws a warning in case you made a mistake. 192 | 193 | Squelching these errors is not a good solution as test code is getting to be 194 | just as important as, if not more than, production code. Catching syntactical 195 | errors in tests using static analysis is a great tool to help make sure that your 196 | tests are well-defined and free of typos. 197 | 198 | A better option was to provide a function-call form for these assertions so that 199 | the code's intent is more clear and the linters stop complaining about something 200 | looking off. This form is added in addition to the existing property access form 201 | and does not impact existing test code. 202 | 203 | ```js 204 | expect(true).to.be.true(); 205 | foo.should.be.ok(); 206 | ``` 207 | 208 | These forms can also be mixed in any way, these are all functionally identical: 209 | 210 | ```js 211 | expect(true).to.be.true.and.not.false(); 212 | expect(true).to.be.true().and.not.false; 213 | expect(true).to.be.true.and.not.false; 214 | ``` 215 | 216 | #### Plugin Authors 217 | 218 | If you would like to provide this function-call form for your terminating assertion 219 | properties, there is a new function to register these types of asserts. Instead 220 | of using `addProperty` to register terminating assertions, simply use `addChainableNoop` 221 | instead; the arguments to both are identical. The latter will make the assertion 222 | available in both the attribute and function-call forms and should have no impact 223 | on existing users of your plugin. 224 | 225 | ### Community Contributions 226 | 227 | - [#297](https://github.com/chaijs/chai/pull/297) Allow writing lint-friendly tests. [@joshperry](https://github.com/joshperry) 228 | - [#298](https://github.com/chaijs/chai/pull/298) Add check for logging `-0`. [@dasilvacontin](https://github.com/dasilvacontin) 229 | - [#300](https://github.com/chaijs/chai/pull/300) Fix #299: the test is defining global variables [@julienw](https://github.com/julienw) 230 | 231 | Thank you to all who took time to contribute! 232 | 233 | ## 1.9.2 / 2014-09-29 234 | 235 | The following changes are required if you are upgrading from the previous version: 236 | 237 | - **Users:** 238 | - No changes required 239 | - **Plugin Developers:** 240 | - No changes required 241 | - **Core Contributors:** 242 | - Refresh `node_modules` folder for updated dependencies. 243 | 244 | ### Community Contributions 245 | 246 | - [#264](https://github.com/chaijs/chai/pull/264) Show diff for keys assertions [@cjthompson](https://github.com/cjthompson) 247 | - [#267](https://github.com/chaijs/chai/pull/267) Use SVG badges [@shinnn](https://github.com/shinnn) 248 | - [#268](https://github.com/chaijs/chai/pull/268) Allow messages to be functions (sinon-compat) [@charlierudolph](https://github.com/charlierudolph) 249 | - [#269](https://github.com/chaijs/chai/pull/269) Remove unused argument for #lengthOf [@charlierudolph](https://github.com/charlierudolph) 250 | - [#275](https://github.com/chaijs/chai/pull/275) Rewrite pretty-printing HTML elements to prevent throwing internal errors [@DrRataplan](https://github.com/DrRataplan) 251 | - [#277](https://github.com/chaijs/chai/pull/277) Fix assert documentation for #sameMembers [@charlierudolph](https://github.com/charlierudolph) 252 | - [#279](https://github.com/chaijs/chai/pull/279) closeTo should check value's type before assertion [@mohayonao](https://github.com/mohayonao) 253 | - [#289](https://github.com/chaijs/chai/pull/289) satisfy is called twice [@charlierudolph](https://github.com/charlierudolph) 254 | - [#292](https://github.com/chaijs/chai/pull/292) resolve conflicts with node-webkit and global usage [@boneskull](https://github.com/boneskull) 255 | 256 | Thank you to all who took time to contribute! 257 | 258 | ## 1.9.1 / 2014-03-19 259 | 260 | The following changes are required if you are upgrading from the previous version: 261 | 262 | - **Users:** 263 | - Migrate configuration options to new interface. (see notes) 264 | - **Plugin Developers:** 265 | - No changes required 266 | - **Core Contributors:** 267 | - Refresh `node_modules` folder for updated dependencies. 268 | 269 | ### Configuration 270 | 271 | There have been requests for changes and additions to the configuration mechanisms 272 | and their impact in the Chai architecture. As such, we have decoupled the 273 | configuration from the `Assertion` constructor. This not only allows for centralized 274 | configuration, but will allow us to shift the responsibility from the `Assertion` 275 | constructor to the `assert` interface in future releases. 276 | 277 | These changes have been implemented in a non-breaking way, but a depretiation 278 | warning will be presented to users until they migrate. The old config method will 279 | be removed in either `v1.11.0` or `v2.0.0`, whichever comes first. 280 | 281 | #### Quick Migration 282 | 283 | ```js 284 | // change this: 285 | chai.Assertion.includeStack = true; 286 | chai.Assertion.showDiff = false; 287 | 288 | // ... to this: 289 | chai.config.includeStack = true; 290 | chai.config.showDiff = false; 291 | ``` 292 | 293 | #### All Config Options 294 | 295 | ##### config.includeStack 296 | 297 | - **@param** _{Boolean}_ 298 | - **@default** `false` 299 | 300 | User configurable property, influences whether stack trace is included in 301 | Assertion error message. Default of `false` suppresses stack trace in the error 302 | message. 303 | 304 | ##### config.showDiff 305 | 306 | - **@param** _{Boolean}_ 307 | - **@default** `true` 308 | 309 | User configurable property, influences whether or not the `showDiff` flag 310 | should be included in the thrown AssertionErrors. `false` will always be `false`; 311 | `true` will be true when the assertion has requested a diff be shown. 312 | 313 | ##### config.truncateThreshold **(NEW)** 314 | 315 | - **@param** _{Number}_ 316 | - **@default** `40` 317 | 318 | User configurable property, sets length threshold for actual and expected values 319 | in assertion errors. If this threshold is exceeded, the value is truncated. 320 | 321 | Set it to zero if you want to disable truncating altogether. 322 | 323 | ```js 324 | chai.config.truncateThreshold = 0; // disable truncating 325 | ``` 326 | 327 | ### Community Contributions 328 | 329 | - [#228](https://github.com/chaijs/chai/pull/228) Deep equality check for memebers. [@duncanbeevers](https://github.com/duncanbeevers) 330 | - [#247](https://github.com/chaijs/chai/pull/247) Proofreading. [@didorellano](https://github.com/didoarellano) 331 | - [#244](https://github.com/chaijs/chai/pull/244) Fix `contain`/`include` 1.9.0 regression. [@leider](https://github.com/leider) 332 | - [#233](https://github.com/chaijs/chai/pull/233) Improvements to `ssfi` for `assert` interface. [@refack](https://github.com/refack) 333 | - [#251](https://github.com/chaijs/chai/pull/251) New config option: object display threshold. [@romario333](https://github.com/romario333) 334 | 335 | Thank you to all who took time to contribute! 336 | 337 | ### Other Bug Fixes 338 | 339 | - [#183](https://github.com/chaijs/chai/issues/183) Allow `undefined` for actual. (internal api) 340 | - Update Karam(+plugins)/Istanbul to most recent versions. 341 | 342 | ## 1.9.0 / 2014-01-29 343 | 344 | The following changes are required if you are upgrading from the previous version: 345 | 346 | - **Users:** 347 | - No changes required 348 | - **Plugin Developers:** 349 | - Review [#219](https://github.com/chaijs/chai/pull/219). 350 | - **Core Contributors:** 351 | - Refresh `node_modules` folder for updated dependencies. 352 | 353 | ### Community Contributions 354 | 355 | - [#202](https://github.com/chaijs/chai/pull/201) Improve error message for .throw(). [@andreineculau](https://github.com/andreineculau) 356 | - [#217](https://github.com/chaijs/chai/pull/217) Chai tests can be run with `--watch`. [@demands](https://github.com/demands) 357 | - [#219](https://github.com/chaijs/chai/pull/219) Add overwriteChainableMethod utility. [@demands](https://github.com/demands) 358 | - [#224](https://github.com/chaijs/chai/pull/224) Return error on throw method to chain on error properties. [@vbardales](https://github.com/vbardales) 359 | - [#226](https://github.com/chaijs/chai/pull/226) Add `has` to language chains. [@duncanbeevers](https://github.com/duncanbeevers) 360 | - [#230](https://github.com/chaijs/chai/pull/230) Support `{a:1,b:2}.should.include({a:1})` [@jkroso](https://github.com/jkroso) 361 | - [#231](https://github.com/chaijs/chai/pull/231) Update Copyright notices to 2014 [@duncanbeevers](https://github.com/duncanbeevers) 362 | - [#232](https://github.com/chaijs/chai/pull/232) Avoid error instantiation if possible on assert.throws. [@laconbass](https://github.com/laconbass) 363 | 364 | Thank you to all who took time to contribute! 365 | 366 | ### Other Bug Fixes 367 | 368 | - [#225](https://github.com/chaijs/chai/pull/225) Improved AMD wrapper provided by upstream `component(1)`. 369 | - [#185](https://github.com/chaijs/chai/issues/185) `assert.throws()` returns thrown error for further assertions. 370 | - [#237](https://github.com/chaijs/chai/pull/237) Remove coveralls/jscoverage, include istanbul coverage report in travis test. 371 | - Update Karma and Sauce runner versions for consistent CI results. No more karma@canary. 372 | 373 | ## 1.8.1 / 2013-10-10 374 | 375 | The following changes are required if you are upgrading from the previous version: 376 | 377 | - **Users:** 378 | - Refresh `node_modules` folder for updated dependencies. 379 | - **Plugin Developers:** 380 | - No changes required 381 | - **Core Contributors:** 382 | - Refresh `node_modules` folder for updated dependencies. 383 | 384 | ### Browserify 385 | 386 | This is a small patch that updates the dependency tree so browserify users can install 387 | chai. (Remove conditional requires) 388 | 389 | ## 1.8.0 / 2013-09-18 390 | 391 | The following changes are required if you are upgrading from the previous version: 392 | 393 | - **Users:** 394 | - See `deep.equal` notes. 395 | - **Plugin Developers:** 396 | - No changes required 397 | - **Core Contributors:** 398 | - Refresh `node_modules` folder for updated dependencies. 399 | 400 | ### Deep Equals 401 | 402 | This version of Chai focused on a overhaul to the deep equal utility. The code for this 403 | tool has been removed from the core lib and can now be found at: 404 | [chai / deep-eql](https://github.com/chaijs/deep-eql). As stated in previous releases, 405 | this is part of a larger initiative to provide transparency, independent testing, and coverage for 406 | some of the more complicated internal tools. 407 | 408 | For the most part `.deep.equal` will behave the same as it has. However, in order to provide a 409 | consistent ruleset across all types being tested, the following changes have been made and _might_ 410 | require changes to your tests. 411 | 412 | **1.** Strict equality for non-traversable nodes according to [egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). 413 | 414 | _Previously:_ Non-traversable equal via `===`. 415 | 416 | ```js 417 | expect(NaN).to.deep.equal(NaN); 418 | expect(-0).to.not.deep.equal(+0); 419 | ``` 420 | 421 | **2.** Arguments are not Arrays (and all types must be equal): 422 | 423 | _Previously:_ Some crazy nonsense that led to empty arrays deep equaling empty objects deep equaling dates. 424 | 425 | ```js 426 | expect(arguments).to.not.deep.equal([]); 427 | expect(Array.prototype.slice.call(arguments)).to.deep.equal([]); 428 | ``` 429 | 430 | - [#156](https://github.com/chaijs/chai/issues/156) Empty object is eql to empty array 431 | - [#192](https://github.com/chaijs/chai/issues/192) empty object is eql to a Date object 432 | - [#194](https://github.com/chaijs/chai/issues/194) refactor deep-equal utility 433 | 434 | ### CI and Browser Testing 435 | 436 | Chai now runs the browser CI suite using [Karma](http://karma-runner.github.io/) directed at 437 | [SauceLabs](https://saucelabs.com/). This means we get to know where our browser support stands... 438 | and we get a cool badge: 439 | 440 | [![Selenium Test Status](https://saucelabs.com/browser-matrix/logicalparadox.svg)](https://saucelabs.com/u/logicalparadox) 441 | 442 | Look for the list of browsers/versions to expand over the coming releases. 443 | 444 | - [#195](https://github.com/chaijs/chai/issues/195) karma test framework 445 | 446 | ## 1.7.2 / 2013-06-27 447 | 448 | The following changes are required if you are upgrading from the previous version: 449 | 450 | - **Users:** 451 | - No changes required. 452 | - **Plugin Developers:** 453 | - No changes required 454 | - **Core Contributors:** 455 | - Refresh `node_modules` folder for updated dependencies. 456 | 457 | ### Coverage Reporting 458 | 459 | Coverage reporting has always been available for core-developers but the data has never been published 460 | for our end users. In our ongoing effort to improve accountability this data will now be published via 461 | the [coveralls.io](https://coveralls.io/) service. A badge has been added to the README and the full report 462 | can be viewed online at the [chai coveralls project](https://coveralls.io/r/chaijs/chai). Furthermore, PRs 463 | will receive automated messages indicating how their PR impacts test coverage. This service is tied to TravisCI. 464 | 465 | ### Other Fixes 466 | 467 | - [#175](https://github.com/chaijs/chai/issues/175) Add `bower.json`. (Fix ignore all) 468 | 469 | ## 1.7.1 / 2013-06-24 470 | 471 | The following changes are required if you are upgrading from the previous version: 472 | 473 | - **Users:** 474 | - No changes required. 475 | - **Plugin Developers:** 476 | - No changes required 477 | - **Core Contributors:** 478 | - Refresh `node_modules` folder for updated dependencies. 479 | 480 | ### Official Bower Support 481 | 482 | Support has been added for the Bower Package Manager ([bower.io])(http://bower.io/). Though 483 | Chai could be installed via Bower in the past, this update adds official support via the `bower.json` 484 | specification file. 485 | 486 | - [#175](https://github.com/chaijs/chai/issues/175) Add `bower.json`. 487 | 488 | ## 1.7.0 / 2013-06-17 489 | 490 | The following changes are required if you are upgrading from the previous version: 491 | 492 | - **Users:** 493 | - No changes required. 494 | - **Plugin Developers:** 495 | - Review AssertionError update notice. 496 | - **Core Contributors:** 497 | - Refresh `node_modules` folder for updated dependencies. 498 | 499 | ### AssertionError Update Notice 500 | 501 | Chai now uses [chaijs/assertion-error](https://github.com/chaijs/assertion-error) instead an internal 502 | constructor. This will allow for further iteration/experimentation of the AssertionError constructor 503 | independant of Chai. Future plans include stack parsing for callsite support. 504 | 505 | This update constructor has a different constructor param signature that conforms more with the standard 506 | `Error` object. If your plugin throws and `AssertionError` directly you will need to update your plugin 507 | with the new signature. 508 | 509 | ```js 510 | var AssertionError = require('chai').AssertionError; 511 | 512 | /** 513 | * previous 514 | * 515 | * @param {Object} options 516 | */ 517 | 518 | throw new AssertionError({ 519 | message: 'An assertion error occurred' 520 | , actual: actual 521 | , expect: expect 522 | , startStackFunction: arguments.callee 523 | , showStack: true 524 | }); 525 | 526 | /** 527 | * new 528 | * 529 | * @param {String} message 530 | * @param {Object} options 531 | * @param {Function} start stack function 532 | */ 533 | 534 | throw new AssertionError('An assertion error occurred', { 535 | actual: actual 536 | , expect: expect 537 | , showStack: true 538 | }, arguments.callee); 539 | 540 | // other signatures 541 | throw new AssertionError('An assertion error occurred'); 542 | throw new AssertionError('An assertion error occurred', null, arguments.callee); 543 | ``` 544 | 545 | #### External Dependencies 546 | 547 | This is the first non-developement dependency for Chai. As Chai continues to evolve we will begin adding 548 | more; the next will likely be improved type detection and deep equality. With Chai's userbase continually growing 549 | there is an higher need for accountability and documentation. External dependencies will allow us to iterate and 550 | test on features independent from our interfaces. 551 | 552 | Note: The browser packaged version `chai.js` will ALWAYS contain all dependencies needed to run Chai. 553 | 554 | ### Community Contributions 555 | 556 | - [#169](https://github.com/chaijs/chai/pull/169) Fix deep equal comparison for Date/Regexp types. [@katsgeorgeek](https://github.com/katsgeorgeek) 557 | - [#171](https://github.com/chaijs/chai/pull/171) Add `assert.notOk()`. [@Bartvds](https://github.com/Bartvds) 558 | - [#173](https://github.com/chaijs/chai/pull/173) Fix `inspect` utility. [@domenic](https://github.com/domenic) 559 | 560 | Thank you to all who took the time to contribute! 561 | 562 | ## 1.6.1 / 2013-06-05 563 | 564 | The following changes are required if you are upgrading from the previous version: 565 | 566 | - **Users:** 567 | - No changes required. 568 | - **Plugin Developers:** 569 | - No changes required. 570 | - **Core Contributors:** 571 | - Refresh `node_modules` folder for updated developement dependencies. 572 | 573 | ### Deep Equality 574 | 575 | Regular Expressions are now tested as part of all deep equality assertions. In previous versions 576 | they silently passed for all scenarios. Thanks to [@katsgeorgeek](https://github.com/katsgeorgeek) for the contribution. 577 | 578 | ### Community Contributions 579 | 580 | - [#161](https://github.com/chaijs/chai/pull/161) Fix documented name for assert interface's isDefined method. [@brandonpayton](https://github.com/brandonpayton) 581 | - [#168](https://github.com/chaijs/chai/pull/168) Fix comparison equality of two regexps for when using deep equality. [@katsgeorgeek](https://github.com/katsgeorgeek) 582 | 583 | Thank you to all who took the time to contribute! 584 | 585 | ### Additional Notes 586 | 587 | - Mocha has been locked at version `1.8.x` to ensure `mocha-phantomjs` compatibility. 588 | 589 | ## 1.6.0 / 2013-04-29 590 | 591 | The following changes are required if you are upgrading from the previous version: 592 | 593 | - **Users:** 594 | - No changes required. 595 | - **Plugin Developers:** 596 | - No changes required. 597 | - **Core Contributors:** 598 | - Refresh `node_modules` folder for updated developement dependencies. 599 | 600 | ### New Assertions 601 | 602 | #### Array Members Inclusion 603 | 604 | Asserts that the target is a superset of `set`, or that the target and `set` have the same members. 605 | Order is not taken into account. Thanks to [@NickHeiner](https://github.com/NickHeiner) for the contribution. 606 | 607 | ```js 608 | // (expect/should) full set 609 | expect([4, 2]).to.have.members([2, 4]); 610 | expect([5, 2]).to.not.have.members([5, 2, 1]); 611 | 612 | // (expect/should) inclusion 613 | expect([1, 2, 3]).to.include.members([3, 2]); 614 | expect([1, 2, 3]).to.not.include.members([3, 2, 8]); 615 | 616 | // (assert) full set 617 | assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); 618 | 619 | // (assert) inclusion 620 | assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); 621 | 622 | ``` 623 | 624 | #### Non-inclusion for Assert Interface 625 | 626 | Most `assert` functions have a negative version, like `instanceOf()` has a corresponding `notInstaceOf()`. 627 | However `include()` did not have a corresponding `notInclude()`. This has been added. 628 | 629 | ```js 630 | assert.notInclude([ 1, 2, 3 ], 8); 631 | assert.notInclude('foobar', 'baz'); 632 | ``` 633 | 634 | ### Community Contributions 635 | 636 | - [#140](https://github.com/chaijs/chai/pull/140) Restore `call`/`apply` methods for plugin interface. [@RubenVerborgh](https://github.com/RubenVerborgh) 637 | - [#148](https://github.com/chaijs/chai/issues/148)/[#153](https://github.com/chaijs/chai/pull/153) Add `members` and `include.members` assertions. [#NickHeiner](https://github.com/NickHeiner) 638 | 639 | Thank you to all who took time to contribute! 640 | 641 | ### Other Bug Fixes 642 | 643 | - [#142](https://github.com/chaijs/chai/issues/142) `assert#include` will no longer silently pass on wrong-type haystack. 644 | - [#158](https://github.com/chaijs/chai/issues/158) `assert#notInclude` has been added. 645 | - Travis-CI now tests Node.js `v0.10.x`. Support for `v0.6.x` has been removed. `v0.8.x` is still tested as before. 646 | 647 | ## 1.5.0 / 2013-02-03 648 | 649 | ### Migration Requirements 650 | 651 | The following changes are required if you are upgrading from the previous version: 652 | 653 | - **Users:** 654 | - _Update [2013-02-04]:_ Some users may notice a small subset of deep equality assertions will no longer pass. This is the result of 655 | [#120](https://github.com/chaijs/chai/issues/120), an improvement to our deep equality algorithm. Users will need to revise their assertions 656 | to be more granular should this occur. Further information: [#139](https://github.com/chaijs/chai/issues/139). 657 | - **Plugin Developers:** 658 | - No changes required. 659 | - **Core Contributors:** 660 | - Refresh `node_modules` folder for updated developement dependencies. 661 | 662 | ### Community Contributions 663 | 664 | - [#126](https://github.com/chaijs/chai/pull/126): Add `eqls` alias for `eql`. [@RubenVerborgh](https://github.com/RubenVerborgh) 665 | - [#127](https://github.com/chaijs/chai/issues/127): Performance refactor for chainable methods. [@RubenVerborgh](https://github.com/RubenVerborgh) 666 | - [#133](https://github.com/chaijs/chai/pull/133): Assertion `.throw` support for primitives. [@RubenVerborgh](https://github.com/RubenVerborgh) 667 | - [#137](https://github.com/chaijs/chai/issues/137): Assertion `.throw` support for empty messages. [@timnew](https://github.com/timnew) 668 | - [#136](https://github.com/chaijs/chai/pull/136): Fix backward negation messages when using `.above()` and `.below()`. [@whatthejeff](https://github.com/whatthejeff) 669 | 670 | Thank you to all who took time to contribute! 671 | 672 | ### Other Bug Fixes 673 | 674 | - Improve type detection of `.a()`/`.an()` to work in cross-browser scenarios. 675 | - [#116](https://github.com/chaijs/chai/issues/116): `.throw()` has cleaner display of errors when WebKit browsers. 676 | - [#120](https://github.com/chaijs/chai/issues/120): `.eql()` now works to compare dom nodes in browsers. 677 | 678 | 679 | ### Usage Updates 680 | 681 | #### For Users 682 | 683 | **1. Component Support:** Chai now included the proper configuration to be installed as a 684 | [component](https://github.com/component/component). Component users are encouraged to consult 685 | [chaijs.com](http://chaijs.com) for the latest version number as using the master branch 686 | does not gaurantee stability. 687 | 688 | ```js 689 | // relevant component.json 690 | devDependencies: { 691 | "chaijs/chai": "1.5.0" 692 | } 693 | ``` 694 | 695 | Alternatively, bleeding-edge is available: 696 | 697 | $ component install chaijs/chai 698 | 699 | **2. Configurable showDiff:** Some test runners (such as [mocha](http://visionmedia.github.com/mocha/)) 700 | include support for showing the diff of strings and objects when an equality error occurs. Chai has 701 | already included support for this, however some users may not prefer this display behavior. To revert to 702 | no diff display, the following configuration is available: 703 | 704 | ```js 705 | chai.Assertion.showDiff = false; // diff output disabled 706 | chai.Assertion.showDiff = true; // default, diff output enabled 707 | ``` 708 | 709 | #### For Plugin Developers 710 | 711 | **1. New Utility - type**: The new utility `.type()` is available as a better implementation of `typeof` 712 | that can be used cross-browser. It handles the inconsistencies of Array, `null`, and `undefined` detection. 713 | 714 | - **@param** _{Mixed}_ object to detect type of 715 | - **@return** _{String}_ object type 716 | 717 | ```js 718 | chai.use(function (c, utils) { 719 | // some examples 720 | utils.type({}); // 'object' 721 | utils.type(null); // `null' 722 | utils.type(undefined); // `undefined` 723 | utils.type([]); // `array` 724 | }); 725 | ``` 726 | 727 | #### For Core Contributors 728 | 729 | **1. Browser Testing**: Browser testing of the `./chai.js` file is now available in the command line 730 | via PhantomJS. `make test` and Travis-CI will now also rebuild and test `./chai.js`. Consequently, all 731 | pull requests will now be browser tested in this way. 732 | 733 | _Note: Contributors opening pull requests should still NOT include the browser build._ 734 | 735 | **2. SauceLabs Testing**: Early SauceLab support has been enabled with the file `./support/mocha-cloud.js`. 736 | Those interested in trying it out should create a free [Open Sauce](https://saucelabs.com/signup/plan) account 737 | and include their credentials in `./test/auth/sauce.json`. 738 | -------------------------------------------------------------------------------- /bower_components/chai/History.md: -------------------------------------------------------------------------------- 1 | ### Note 2 | 3 | As of 3.0.0, the History.md file has been deprecated. [Please refer to the full 4 | commit logs available on GitHub](https://github.com/chaijs/chai/commits/master). 5 | 6 | --- 7 | 8 | 2.3.0 / 2015-04-26 9 | ================== 10 | 11 | * Merge pull request #423 from ehntoo/patch-1 12 | * Merge pull request #422 from ljharb/fix_descriptor_tests 13 | * Fix a small bug in the .null assertion docs 14 | * Use a regex to account for property ordering issues across engines. 15 | * Add `make test-firefox` 16 | * Merge pull request #417 from astorije/astorije/minimalist-typo 17 | * Remove trailing whitespaces 18 | * Fix super minor typo in an example 19 | * Merge pull request #408 from ljharb/enumerableProperty 20 | * Add `ownPropertyDescriptor` assertion. 21 | 22 | 2.2.0 / 2015-03-26 23 | ================== 24 | 25 | * Merge pull request #405 from chaijs/deep-escape-doc-tweaks 26 | * Tweak documentation on `.deep` flag. 27 | * Merge pull request #402 from umireon/escaping-dot-should-be-taken 28 | * Documentation of escaping in `.deep` flag. 29 | * take regular expression apart 30 | * Feature: backslash-escaping in `.deep.property` 31 | * Escaping dot should be taken in deep property 32 | 33 | 2.1.2 / 2015-03-15 34 | ================== 35 | 36 | * Merge pull request #396 from chaijs/add-keith-cirkel-contributing-md 37 | * Add Keith Cirkel to CONTRIBUTING.md 38 | * Merge pull request #395 from cjqed/386-assert-operator-no-eval 39 | * No longer using eval on assert operator #386 40 | * Merge pull request #389 from chaijs/update-git-summary 41 | * Update `git summary` in README 42 | 43 | 2.1.1 / 2015-03-04 44 | ================== 45 | 46 | * Merge pull request #385 from eldritch-fossicker/master 47 | * updates to reflect code style preference from @keithamus 48 | * fix indexing into array with deep propery 49 | * Merge pull request #382 from astorije/patch-2 50 | * Merge pull request #383 from gurdiga/config-doc-wording-improvement 51 | * config.truncateThreshold docs: simpler wording 52 | * Add missing docstring for showDiff argument of assert 53 | * Merge pull request #381 from astorije/patch-1 54 | * Add a minor precision that empty asserts on strings too. 55 | * Merge pull request #379 from dcneiner/should-primitive-fix 56 | * Primitives now use valueOf in shouldGetter 57 | 58 | 2.1.0 / 2015-02-23 59 | ================== 60 | 61 | * Merge pull request #374 from jmm/v2.0.1 62 | * Increment version to 2.0.1. 63 | * Merge pull request #365 from chaijs/fix-travis 64 | * Fix travis.yml deploy 65 | * Merge pull request #356 from Soviut/master 66 | * documented fail methods for expect and should interfaces 67 | * fail method added directly to expect 68 | 69 | 2.0.0 / 2015-02-09 70 | ================== 71 | 72 | * Merge pull request #361 from gregglind/b265-keys-object 73 | * fix #359. Add `.keys(object)` 74 | * Merge pull request #359 from gregglind/b359-unexpected-keys-sort 75 | * Fix #359 keys() sorts input unexpectedly 76 | * contrib: publish release strategy and travis npm creds #337 77 | * Merge pull request #357 from danilovaz/master 78 | * Update copyright date 79 | * Merge pull request #349 from toastynerd/add-which-chain-method 80 | * add the which chain method as per issue #347 81 | * Merge pull request #333 from cmpolis/change-assertions 82 | * more `by` cleanup 83 | * cleaned out `.by` for #333 84 | * Merge pull request #335 from DingoEatingFuzz/expose-util 85 | * Expose chai util through the chai object 86 | * cleanup (per notes on pr #333) 87 | * updated `change` to work w/ non-number values + tests 88 | * Merge pull request #334 from hurrymaplelad/patch-1 89 | * Typo, the flag is called 'contains' with an 's' 90 | * updated assertion interface with `change` (#330) 91 | * added `change`,`increase`,`decrease` assertions (#330) 92 | * assert tests for `change`,`increase`,`decrease` 93 | * expect/should tests for `change`,`increase`,`decrease` 94 | * Merge pull request #328 from lo1tuma/issue-327 95 | * Add includes and contains alias (fixes #327) 96 | * Merge pull request #325 from chasenlehara/overwriteChainableMethodDocs 97 | * Fix docs for overwriteChainableMethod parameters 98 | * Merge pull request #317 from jasonkarns/patch-2 99 | * Merge pull request #318 from jasonkarns/patch-3 100 | * Merge pull request #316 from jasonkarns/patch-1 101 | * typos in docs 102 | * minor docs typo 103 | * update docs: getAllFlags -> transferFlags 104 | * Merge pull request #313 from cjqed/254-expect-any-all 105 | * Added the all and any flags for keys assertion, with all being the default behavior 106 | * Merge pull request #312 from cjqed/291-assert-same-deep-members 107 | * Changed public comment of sameDeepMemebers to be more clear 108 | * Fixes issue #291, adds assert.sameDeepMembers 109 | * Merge pull request #311 from cjqed/305-above-below-on-assert 110 | * Merge pull request #308 from prodatakey/hasproperty 111 | * Issue #305 fixed, added assert.isAbove and assert.isBelow 112 | * Fix typo 113 | * More unit tests for new utility functions 114 | * Refactor common functionality, document, test 115 | * Refactor if statement out 116 | * Small unit test fix 117 | * Handle array indexing terminating paths 118 | * Merge pull request #309 from ericdouglas/iterableEqual-couting-once 119 | * couting variables just once 120 | * Fix properties with `undefined` value pass property assertion 121 | * Merge pull request #306 from chaijs/revert-297-noopchainfunc 122 | * Revert "Allows writing lint-friendly tests" 123 | 124 | 1.10.0 / 2014-11-10 125 | ================== 126 | 127 | * Merge pull request #297 from prodatakey/noopchainfunc 128 | * Merge pull request #300 from julienw/299-fix-getMessage-test 129 | * Fix #299: the test is defining global variables 130 | * Add a couple more unit tests 131 | * Add unit tests for chained terminating property asserts 132 | * Revise documentation wording 133 | * Add docs for function style NOOP asserts 134 | * Make the NOOP function a shared constant 135 | * Merge pull request #298 from dasilvacontin/negativeZeroLogging 136 | * why not more assertions 137 | * added test for inspecting `-0` 138 | * a more readable/simple condition statement, as pointed out by @keithamus 139 | * added check for logging negative zero 140 | * Change test to not trigger argument bug 141 | * Allows writing lint-friendly tests 142 | * readme: update contributors for 1.9.2 143 | 144 | 1.9.2 / 2014-09-29 145 | ================== 146 | 147 | * Merge pull request #268 from charlierudolph/cr-lazyMessages 148 | * Merge pull request #269 from charlierudolph/cr-codeCleanup 149 | * Merge pull request #277 from charlierudolph/fix-doc 150 | * Merge pull request #279 from mohayonao/fix-closeTo 151 | * Merge pull request #292 from boneskull/mocha 152 | * resolves #255: upgrade mocha 153 | * Merge pull request #289 from charlierudolph/cr-dryUpCode 154 | * Dry up code 155 | * Merge pull request #275 from DrRataplan/master 156 | * assert: .closeTo() verify value's type before assertion 157 | * Rewrite pretty-printing HTML elements to prevent throwing internal errors Fixes errors occuring when using a non-native DOM implementation 158 | * Fix assert documentation 159 | * Remove unused argument 160 | * Allow messages to be functions 161 | * Merge pull request #267 from shinnn/master 162 | * Use SVG badge 163 | * Merge pull request #264 from cjthompson/keys_diff 164 | * Show diff for keys assertion 165 | 166 | 1.9.1 / 2014-03-19 167 | ================== 168 | 169 | * deps update 170 | * util: [getActual] select actual logic now allows undefined for actual. Closes #183 171 | * docs: [config] make public, express param type 172 | * Merge pull request #251 from romario333/threshold3 173 | * Fix issue #166 - configurable threshold in objDisplay. 174 | * Move configuration options to config.js. 175 | * Merge pull request #233 from Empeeric/master 176 | * Merge pull request #244 from leider/fix_for_contains 177 | * Merge pull request #247 from didoarellano/typo-fixes 178 | * Fix typos 179 | * Merge pull request #245 from lfac-pt/patch-1 180 | * Update `exports.version` to 1.9.0 181 | * aborting loop on finding 182 | * declaring variable only once 183 | * additional test finds incomplete implementation 184 | * simplified code 185 | * fixing #239 (without changing chai.js) 186 | * ssfi as it should be 187 | * Merge pull request #228 from duncanbeevers/deep_members 188 | * Deep equality check for collection membership 189 | 190 | 1.9.0 / 2014-01-29 191 | ================== 192 | 193 | * docs: add contributing.md #238 194 | * assert: .throws() returns thrown error. Closes #185 195 | * Merge pull request #232 from laconbass/assert-throws 196 | * assert: .fail() parameter mismatch. Closes #206 197 | * Merge branch 'karma-fixes' 198 | * Add karma phantomjs launcher 199 | * Use latest karma and sauce launcher 200 | * Karma tweaks 201 | * Merge pull request #230 from jkroso/include 202 | * Merge pull request #237 from chaijs/coverage 203 | * Add coverage to npmignore 204 | * Remove lib-cov from test-travisci dependents 205 | * Remove the not longer needed lcov reporter 206 | * Test coverage with istanbul 207 | * Remove jscoverage 208 | * Remove coveralls 209 | * Merge pull request #226 from duncanbeevers/add_has 210 | * Avoid error instantiation if possible on assert.throws 211 | * Merge pull request #231 from duncanbeevers/update_copyright_year 212 | * Update Copyright notices to 2014 213 | * handle negation correctly 214 | * add failing test case 215 | * support `{a:1,b:2}.should.include({a:1})` 216 | * Merge pull request #224 from vbardales/master 217 | * Add `has` to language chains 218 | * Merge pull request #219 from demands/overwrite_chainable 219 | * return error on throw method to chain on error properties, possibly different from message 220 | * util: store chainable behavior in a __methods object on ctx 221 | * util: code style fix 222 | * util: add overwriteChainableMethod utility (for #215) 223 | * Merge pull request #217 from demands/test_cleanup 224 | * test: make it possible to run utilities tests with --watch 225 | * makefile: change location of karma-runner bin script 226 | * Merge pull request #202 from andreineculau/patch-2 227 | * test: add tests for throwing custom errors 228 | * Merge pull request #201 from andreineculau/patch-1 229 | * test: updated for the new assertion errors 230 | * core: improve message for assertion errors (throw assertion) 231 | 232 | 1.8.1 / 2013-10-10 233 | ================== 234 | 235 | * pkg: update deep-eql version 236 | 237 | 1.8.0 / 2013-09-18 238 | ================== 239 | 240 | * test: [sauce] add a few more browsers 241 | * Merge branch 'refactor/deep-equal' 242 | * util: remove embedded deep equal utility 243 | * util: replace embedded deep equal with external module 244 | * Merge branch 'feature/karma' 245 | * docs: add sauce badge to readme [ci skip] 246 | * test: [sauce] use karma@canary to prevent timeouts 247 | * travis: only run on node 0.10 248 | * test: [karma] use karma phantomjs runner 249 | * Merge pull request #181 from tricknotes/fix-highlight 250 | * Fix highlight for example code 251 | 252 | 1.7.2 / 2013-06-27 253 | ================== 254 | 255 | * coverage: add coveralls badge 256 | * test: [coveralls] add coveralls api integration. testing travis-ci integration 257 | * Merge branch 'master' of github.com:chaijs/chai 258 | * Merge branch 'feature/bower' 259 | * Merge pull request #180 from tricknotes/modify-method-title 260 | * Merge pull request #179 from tricknotes/highlight-code-example 261 | * Modify method title to include argument name 262 | * Fix to highlight code example 263 | * bower: granular ignores 264 | 265 | 1.7.1 / 2013-06-24 266 | ================== 267 | 268 | * Merge branch 'feature/bower'. #175 269 | * bower: add json file 270 | * build: browser 271 | 272 | 1.7.0 / 2013-06-17 273 | ================== 274 | 275 | * error: remove internal assertion error constructor 276 | * core: [assertion-error] replace internal assertion error with dep 277 | * deps: add chaijs/assertion-error@1.0.0 278 | * docs: fix typo in source file. #174 279 | * Merge pull request #174 from piecioshka/master 280 | * typo 281 | * Merge branch 'master' of github.com:chaijs/chai 282 | * pkg: lock mocha/mocha-phantomjs versions (for now) 283 | * Merge pull request #173 from chaijs/inspect-fix 284 | * Fix `utils.inspect` with custom object-returning inspect()s. 285 | * Merge pull request #171 from Bartvds/master 286 | * replaced tabs with 2 spaces 287 | * added assert.notOk() 288 | * Merge pull request #169 from katsgeorgeek/topics/master 289 | * Fix comparison objects. 290 | 291 | 1.6.1 / 2013-06-05 292 | ================== 293 | 294 | * Merge pull request #168 from katsgeorgeek/topics/master 295 | * Add test for different RegExp flags. 296 | * Add test for regexp comparison. 297 | * Downgrade mocha version for fix running Phantom tests. 298 | * Fix comparison equality of two regexps. 299 | * Merge pull request #161 from brandonpayton/master 300 | * Fix documented name for assert interfaces isDefined method 301 | 302 | 1.6.0 / 2013-04-29 303 | ================== 304 | 305 | * build: browser 306 | * assert: [(not)include] throw on incompatible haystack. Closes #142 307 | * assert: [notInclude] add assert.notInclude. Closes #158 308 | * browser build 309 | * makefile: force browser build on browser-test 310 | * makefile: use component for browser build 311 | * core: [assertions] remove extraneous comments 312 | * Merge branch 'master' of github.com:chaijs/chai 313 | * test: [assert] deep equal ordering 314 | * Merge pull request #153 from NickHeiner/array-assertions 315 | * giving members a no-flag assertion 316 | * Code review comments - changing syntax 317 | * Code review comments 318 | * Adding members and memberEquals assertions for checking for subsets and set equality. Implements chaijs/chai#148. 319 | * Merge pull request #140 from RubenVerborgh/function-prototype 320 | * Restore the `call` and `apply` methods of Function when adding a chainable method. 321 | * readme: 2013 322 | * notes: migration notes for deep equal changes 323 | * test: for ever err() there must be a passing version 324 | 325 | 1.5.0 / 2013-02-03 326 | ================== 327 | 328 | * docs: add Release Notes for non-gitlog summary of changes. 329 | * lib: update copyright to 2013 330 | * Merge branch 'refactor/travis' 331 | * makefile: remove test-component for full test run 332 | * pkg: script test now runs make test so travis will test browser 333 | * browser: build 334 | * tests: refactor some tests to support new objDisplay output 335 | * test: [bootstrap] normalize boostrap across all test scenarios 336 | * assertions: refactor some assertions to use objDisplay instead of inspect 337 | * util: [objDisplay] normalize output of functions 338 | * makefile: refactor for full build scenarios 339 | * component: fix build bug where missing util:type file 340 | * assertions: [throw] code cleanup 341 | * Merge branch 'refactor/typeDetection' 342 | * browser: build 343 | * makefile: chai.js is .PHONY so it builds every time 344 | * test: [expect] add arguments type detection test 345 | * core/assertions: [type] (a/an) refactor to use type detection utility 346 | * util: add cross-browser type detection utility 347 | * Merge branch 'feature/component' 348 | * browser: build 349 | * component: add component.json file 350 | * makefile: refactor for fine grain control of testing scenarios 351 | * test: add mochaPhantomJS support and component test file 352 | * deps: add component and mocha-phantomjs for browser testing 353 | * ignore: update ignore files for component support 354 | * travis: run for all branches 355 | * Merge branch 'feature/showDiff' 356 | * test: [Assertion] configruable showDiff flag. Closes #132 357 | * lib: [Assertion] add configurable showDiff flag. #132 358 | * Merge branch 'feature/saucelabs' 359 | * Merge branch 'master' into feature/saucelabs 360 | * browser: build 361 | * support: add mocha cloud runner, client, and html test page 362 | * test: [saucelabs] add auth placeholder 363 | * deps: add mocha-cloud 364 | * Merge pull request #136 from whatthejeff/message_fix 365 | * Merge pull request #138 from timnew/master 366 | * Fix issue #137, test message existence by using message!=null rather than using message 367 | * Fixed backwards negation messages. 368 | * Merge pull request #133 from RubenVerborgh/throw 369 | * Functions throwing strings can reliably be tested. 370 | * Merge pull request #131 from RubenVerborgh/proto 371 | * Cache whether __proto__ is supported. 372 | * Use __proto__ if available. 373 | * Determine the property names to exclude beforehand. 374 | * Merge pull request #126 from RubenVerborgh/eqls 375 | * Add alias eqls for eql. 376 | * Use inherited enumerable properties in deep equality comparison. 377 | * Show inherited properties when inspecting an object. 378 | * Add new getProperties and getEnumerableProperties utils. 379 | * showDiff: force true for equal and eql 380 | 381 | 1.4.2 / 2012-12-21 382 | ================== 383 | 384 | * browser build: (object diff support when used with mocha) #106 385 | * test: [display] array test for mocha object diff 386 | * browser: no longer need different AssertionError constructor 387 | 388 | 1.4.1 / 2012-12-21 389 | ================== 390 | 391 | * showDiff: force diff for equal and eql. #106 392 | * test: [expect] type null. #122 393 | * Merge pull request #115 from eshao/fix-assert-Throw 394 | * FIX: assert.Throw checks error type/message 395 | * TST: assert.Throw should check error type/message 396 | 397 | 1.4.0 / 2012-11-29 398 | ================== 399 | 400 | * pre-release browser build 401 | * clean up index.js to not check for cov, revert package.json to use index.js 402 | * convert tests to use new bootstrap 403 | * refactor testing bootstrap 404 | * use spaces (not tabs). Clean up #114 405 | * Merge pull request #114 from trantorLiu/master 406 | * Add most() (alias: lte) and least() (alias: gte) to the API with new chainers "at" and "of". 407 | * Change `main` to ./lib/chai. Fixes #28. 408 | * Merge pull request #104 from connec/deep_equals_circular_references_ 409 | * Merge pull request #109 from nnarhinen/patch-1 410 | * Check for 'actual' type 411 | * Added support for circular references when checking deep (in)equality. 412 | 413 | 1.3.0 / 2012-10-01 414 | ================== 415 | 416 | * browser build w/ folio >= 0.3.4. Closes #99 417 | * add back buffer test for deep equal 418 | * do not write flags to assertion.prototype 419 | * remove buffer test from expect 420 | * browser build 421 | * improve documentation of custom error messages 422 | * Merge branch 'master' of git://github.com/Liffft/chai into Liffft-master 423 | * browser build 424 | * improved buffer deep equal checking 425 | * mocha is npm test command 426 | * Cleaning up the js style… 427 | * expect tests now include message pass-through 428 | * packaging up browser-side changes… 429 | * Increasing Throws error message verbosity 430 | * Should syntax: piping message through 431 | * Make globalShould test work in browser too. 432 | * Add a setter for `Object.prototype.should`. Closes #86. 433 | 434 | 1.2.0 / 2012-08-07 435 | ================== 436 | 437 | * Merge branch 'feature/errmsg' 438 | * browser build 439 | * comment updates for utilities 440 | * tweak objDislay to only kick in if object inspection is too long 441 | * Merge branch 'master' into feature/errmsg 442 | * add display sample for error message refactor 443 | * first draft of error message refactor. #93 444 | * add `closeTo` assertion to `assert` interface. Closes #89. 445 | * update folio build for better require.js handling. Closes #85 446 | * Merge pull request #92 from paulmillr/topics/add-dom-checks 447 | * Add check for DOM objects. 448 | * browser build 449 | * Merge branch 'master' of github.com:chaijs/chai 450 | * bug - getActual not defaulting to assertion subject 451 | * Merge pull request #88 from pwnall/master 452 | * Don't inspect() assertion arguments if the assertion passes. 453 | 454 | 1.1.1 / 2012-07-09 455 | ================== 456 | 457 | * improve commonjs support on browser build 458 | * Merge pull request #83 from tkazec/equals 459 | * Document .equals 460 | * Add .equals as an alias of .equal 461 | * remove unused browser prefix/suffix 462 | * Merge branch 'feature/folio-build' 463 | * browser build 464 | * using folio to compile 465 | * clean up makefile 466 | * early folio 0.3.x support 467 | 468 | 1.1.0 / 2012-06-26 469 | ================== 470 | 471 | * browser build 472 | * Disable "Assertion.includeStack is false" test in IE. 473 | * Use `utils.getName` for all function inspections. 474 | * Merge pull request #80 from kilianc/closeTo 475 | * fixes #79 476 | * browser build 477 | * expand docs to indicate change of subject for chaining. Closes #78 478 | * add `that` chain noop 479 | * Merge branch 'bug/74' 480 | * comments on how to property use `length` as chain. Closes #74 481 | * tests for length as chainable property. #74 482 | * add support for `length` as chainable prop/method. 483 | * Merge branch 'bug/77' 484 | * tests for getPathValue when working with nested arrays. Closes #77 485 | * add getPathValue support for nested arrays 486 | * browser build 487 | * fix bug for missing browser utils 488 | * compile tool aware of new folder layout 489 | * Merge branch 'refactor/1dot1' 490 | * move core assertions to own file and refactor all using utils 491 | * rearrange folder structure 492 | 493 | 1.0.4 / 2012-06-03 494 | ================== 495 | 496 | * Merge pull request #68 from fizker/itself 497 | * Added itself chain. 498 | * simplify error inspections for cross browser compatibility 499 | * fix safari `addChainableMethod` errors. Closes #69 500 | 501 | 1.0.3 / 2012-05-27 502 | ================== 503 | 504 | * Point Travis badge to the right place. 505 | * Make error message for eql/deep.equal more clear. 506 | * Fix .not.deep.equal. 507 | * contributors list 508 | 509 | 1.0.2 / 2012-05-26 510 | ================== 511 | 512 | * Merge pull request #67 from chaijs/chaining-and-flags 513 | * Browser build. 514 | * Use `addChainableMethod` to get away from `__proto__` manipulation. 515 | * New `addChainableMethod` utility. 516 | * Replace `getAllFlags` with `transferFlags` utility. 517 | * browser build 518 | * test - get all flags 519 | * utility - get all flags 520 | * Add .mailmap to .npmignore. 521 | * Add a .mailmap file to fix my name in shortlogs. 522 | 523 | 1.0.1 / 2012-05-18 524 | ================== 525 | 526 | * browser build 527 | * Fixing "an" vs. "a" grammar in type assertions. 528 | * Uniformize `assert` interface inline docs. 529 | * Don't use `instanceof` for `assert.isArray`. 530 | * Add `deep` flag for equality and property value. 531 | * Merge pull request #64 from chaijs/assertion-docs 532 | * Uniformize assertion inline docs. 533 | * Add npm-debug.log to .gitignore. 534 | * no reserved words as actuals. #62 535 | 536 | 1.0.0 / 2012-05-15 537 | ================== 538 | 539 | * readme cleanup 540 | * browser build 541 | * utility comments 542 | * removed docs 543 | * update to package.json 544 | * docs build 545 | * comments / docs updates 546 | * plugins app cleanup 547 | * Merge pull request #61 from joliss/doc 548 | * Fix and improve documentation of assert.equal and friends 549 | * browser build 550 | * doc checkpoint - texture 551 | * Update chai-jquery link 552 | * Use defined return value of Assertion extension functions 553 | * Update utility docs 554 | 555 | 1.0.0-rc3 / 2012-05-09 556 | ================== 557 | 558 | * Merge branch 'feature/rc3' 559 | * docs update 560 | * browser build 561 | * assert test conformity for minor refactor api 562 | * assert minor refactor 563 | * update util tests for new add/overwrite prop/method format 564 | * added chai.Assertion.add/overwrite prop/method for plugin toolbox 565 | * add/overwrite prop/method don't make assumptions about context 566 | * doc test suite 567 | * docs don't need coverage 568 | * refactor all simple chains into one forEach loop, for clean documentation 569 | * updated npm ignore 570 | * remove old docs 571 | * docs checkpoint - guide styled 572 | * Merge pull request #59 from joliss/doc 573 | * Document how to run the test suite 574 | * don't need to rebuild docs to view 575 | * dep update 576 | * docs checkpoint - api section 577 | * comment updates for docs 578 | * new doc site checkpoint - plugin directory! 579 | * Merge pull request #57 from kossnocorp/patch-1 580 | * Fix typo: devDependancies → devDependencies 581 | * Using message flag in `getMessage` util instead of old `msg` property. 582 | * Adding self to package.json contributors. 583 | * `getMessage` shouldn't choke on null/omitted messages. 584 | * `return this` not necessary in example. 585 | * `return this` not necessary in example. 586 | * Sinon–Chai has a dash 587 | * updated plugins list for docs 588 | 589 | 1.0.0-rc2 / 2012-05-06 590 | ================== 591 | 592 | * Merge branch 'feature/test-cov' 593 | * browser build 594 | * missing assert tests for ownProperty 595 | * appropriate assert equivalent for expect.to.have.property(key, val) 596 | * reset AssertionError to include full stack 597 | * test for plugin utilities 598 | * overwrite Property and Method now ensure chain 599 | * version notes in readme 600 | 601 | 1.0.0-rc1 / 2012-05-04 602 | ================== 603 | 604 | * browser build (rc1) 605 | * assert match/notMatch tests 606 | * assert interface - notMatch, ownProperty, notOwnProperty, ownPropertyVal, ownPropertyNotVal 607 | * cleaner should interface export. 608 | * added chai.Assertion.prototype._obj (getter) for quick access to object flag 609 | * moved almostEqual / almostDeepEqual to stats plugin 610 | * added mocha.opts 611 | * Add test for `utils.addMethod` 612 | * Fix a typo 613 | * Add test for `utils.overwriteMethod` 614 | * Fix a typo 615 | * Browser build 616 | * Add undefined assertion 617 | * Add null assertion 618 | * Fix an issue with `mocha --watch` 619 | * travis no longer tests on node 0.4.x 620 | * removing unnecissary carbon dep 621 | * Merge branch 'feature/plugins-app' 622 | * docs build 623 | * templates for docs express app for plugin directory 624 | * express app for plugin and static serving 625 | * added web server deps 626 | * Merge pull request #54 from josher19/master 627 | * Remove old test.assert code 628 | * Use util.inspect instead of inspect for deepAlmostEqual and almostEqual 629 | * browser build 630 | * Added almostEqual and deepAlmostEqual to assert test suite. 631 | * bug - context determinants for utils 632 | * dec=0 means rounding, so assert.deepAlmostEqual({pi: 3.1416}, {pi: 3}, 0) is true 633 | * wrong travis link 634 | * readme updates for version information 635 | * travis tests 0.5.x branch as well 636 | * [bug] util `addProperty` not correctly exporting 637 | * read me version notes 638 | * browser build 1.0.0alpha1 639 | * not using reserved words in internal assertions. #52 640 | * version tick 641 | * clean up redundant tests 642 | * Merge branch 'refs/heads/0.6.x' 643 | * update version tag in package 1.0.0alpha1 644 | * browser build 645 | * added utility tests to browser specs 646 | * beginning utility testing 647 | * updated utility comments 648 | * utility - overwriteMethod 649 | * utility - overwriteProperty 650 | * utility - addMethod 651 | * utility - addProperty 652 | * missing ; 653 | * contributors list update 654 | * Merge branch 'refs/heads/0.6.x-docs' into 0.6.x 655 | * Added guide link to docs. WIP 656 | * Include/contain are now both properties and methods 657 | * Add an alias annotation 658 | * Remove usless function wrapper 659 | * Fix a typo 660 | * A/an are now both properties and methods 661 | * [docs] new site homepage layout / color checkpoint 662 | * Ignore IE-specific error properties. 663 | * Fixing order of error message test. 664 | * New cross-browser `getName` util. 665 | * Fixing up `AssertionError` inheritance. 666 | * backup docs 667 | * Add doctypes 668 | * [bug] was still using `constructor.name` in `throw` assertion 669 | * [bug] flag Object.create(null) instead of new Object 670 | * [test] browser build 671 | * [refactor] all usage of Assertion.prototype.assert now uses template tags and flags 672 | * [refactor] remove Assertion.prototype.inspect for testable object inspection 673 | * [refactor] object to test is now stored in flag, with ssfi and custom message 674 | * [bug] flag util - don't return on `set` 675 | * [docs] comments for getMessage utility 676 | * [feature] getMessage 677 | * [feature] testing utilities 678 | * [refactor] flag doesn't require `call` 679 | * Make order of source files well-defined 680 | * Added support for throw(errorInstance). 681 | * Use a foolproof method of grabbing an error's name. 682 | * Removed constructor.name check from throw. 683 | * disabled stackTrack configuration tests until api is stable again 684 | * first version of line displayed error for node js (unstable) 685 | * refactor core Assertion to use flag utility for negation 686 | * added flag utility 687 | * tests for assert interface negatives. Closed #42 688 | * added assertion negatives that were missing. #42 689 | * Support for expected and actual parameters in assert-style error object 690 | * chai as promised - readme 691 | * Added assert.fail. Closes #40 692 | * better error message for assert.operator. Closes #39 693 | * [refactor] Assertion#property to use getPathValue property 694 | * added getPathValue utility helper 695 | * removed todo about browser build 696 | * version notes 697 | * version bumb 0.6.0 698 | * browser build 699 | * [refactor] browser compile function to replace with `require('./error')' with 'require('./browser/error')' 700 | * [feature] browser uses different error.js 701 | * [refactor] error without chai.fail 702 | * Assertion & interfaces use new utils helper export 703 | * [refactor] primary export for new plugin util usage 704 | * added util index.js helper 705 | * added 2012 to copyright headers 706 | * Added DeepEqual assertions 707 | 708 | 0.5.3 / 2012-04-21 709 | ================== 710 | 711 | * Merge branch 'refs/heads/jgonera-oldbrowsers' 712 | * browser build 713 | * fixed reserved names for old browsers in interface/assert 714 | * fixed reserved names for old browsers in interface/should 715 | * fixed: chai.js no longer contains fail() 716 | * fixed reserved names for old browsers in Assertion 717 | * Merge pull request #49 from joliss/build-order 718 | * Make order of source files well-defined 719 | * Merge pull request #43 from zzen/patch-1 720 | * Support for expected and actual parameters in assert-style error object 721 | * chai as promised - readme 722 | 723 | 0.5.2 / 2012-03-21 724 | ================== 725 | 726 | * browser build 727 | * Merge branch 'feature/assert-fail' 728 | * Added assert.fail. Closes #40 729 | * Merge branch 'bug/operator-msg' 730 | * better error message for assert.operator. Closes #39 731 | * version notes 732 | 733 | 0.5.1 / 2012-03-14 734 | ================== 735 | 736 | * chai.fail no longer exists 737 | * Merge branch 'feature/assertdefined' 738 | * Added asset#isDefined. Closes #37. 739 | * dev docs update for Assertion#assert 740 | 741 | 0.5.0 / 2012-03-07 742 | ================== 743 | 744 | * [bug] on inspect of reg on n 0.4.12 745 | * Merge branch 'bug/33-throws' 746 | * Merge pull request #35 from logicalparadox/empty-object 747 | * browser build 748 | * updated #throw docs 749 | * Assertion#throw `should` tests updated 750 | * Assertion#throw `expect` tests 751 | * Should interface supports multiple throw parameters 752 | * Update Assertion#throw to support strings and type checks. 753 | * Add more tests for `empty` in `should`. 754 | * Add more tests for `empty` in `expect`. 755 | * Merge branch 'master' into empty-object 756 | * don't switch act/exp 757 | * Merge pull request #34 from logicalparadox/assert-operator 758 | * Update the compiled verison. 759 | * Add `assert.operator`. 760 | * Notes on messages. #22 761 | * browser build 762 | * have been test 763 | * below tests 764 | * Merge branch 'feature/actexp' 765 | * browser build 766 | * remove unnecessary fail export 767 | * full support for actual/expected where relevant 768 | * Assertion.assert support expected value 769 | * clean up error 770 | * Update the compiled version. 771 | * Add object & sane arguments support to `Assertion#empty`. 772 | 773 | 0.4.2 / 2012-02-28 774 | ================== 775 | 776 | * fix for `process` not available in browser when used via browserify. Closes #28 777 | * Merge pull request #31 from joliss/doc 778 | * Document that "should" works in browsers other than IE 779 | * Merge pull request #30 from logicalparadox/assert-tests 780 | * Update the browser version of chai. 781 | * Update `assert.doesNotThrow` test in order to check the use case when type is a string. 782 | * Add test for `assert.ifError`. 783 | * Falsey -> falsy. 784 | * Full coverage for `assert.throws` and `assert.doesNotThrow`. 785 | * Add test for `assert.doesNotThrow`. 786 | * Add test for `assert.throws`. 787 | * Add test for `assert.length`. 788 | * Add test for `assert.include`. 789 | * Add test for `assert.isBoolean`. 790 | * Fix the implementation of `assert.isNumber`. 791 | * Add test for `assert.isNumber`. 792 | * Add test for `assert.isString`. 793 | * Add test for `assert.isArray`. 794 | * Add test for `assert.isUndefined`. 795 | * Add test for `assert.isNotNull`. 796 | * Fix `assert.isNotNull` implementation. 797 | * Fix `assert.isNull` implementation. 798 | * Add test for `assert.isNull`. 799 | * Add test for `assert.notDeepEqual`. 800 | * Add test for `assert.deepEqual`. 801 | * Add test for `assert.notStrictEqual`. 802 | * Add test for `assert.strictEqual`. 803 | * Add test for `assert.notEqual`. 804 | 805 | 0.4.1 / 2012-02-26 806 | ================== 807 | 808 | * Merge pull request #27 from logicalparadox/type-fix 809 | * Update the browser version. 810 | * Add should tests for type checks. 811 | * Add function type check test. 812 | * Add more type checks tests. 813 | * Add test for `new Number` type check. 814 | * Fix type of actual checks. 815 | 816 | 0.4.0 / 2012-02-25 817 | ================== 818 | 819 | * docs and readme for upcoming 0.4.0 820 | * docs generated 821 | * putting coverage and tests for docs in docs/out/support 822 | * make docs 823 | * makefile copy necessary resources for tests in docs 824 | * rename configuration test 825 | * Merge pull request #21 from logicalparadox/close-to 826 | * Update the browser version. 827 | * Update `closeTo()` docs. 828 | * Add `Assertion.closeTo()` method. 829 | * Add `.closeTo()` should test. 830 | * Add `.closeTo()` expect test. 831 | * Merge pull request #20 from logicalparadox/satisfy 832 | * Update the browser version. 833 | * `..` -> `()` in `.satisfy()` should test. 834 | * Update example for `.satisfy()`. 835 | * Update the compiled browser version. 836 | * Add `Assertion.satisfy()` method. 837 | * Add `.satisfy()` should test. 838 | * Add `.satisfy()` expect test. 839 | * Merge pull request #19 from logicalparadox/respond-to 840 | * Update the compiled browser version. 841 | * Add `respondTo` Assertion. 842 | * Add `respondTo` should test. 843 | * Add `respondTo` expect test. 844 | * Merge branch 'feature/coverage' 845 | * mocha coverage support 846 | * doc contributors 847 | * README contributors 848 | 849 | 0.3.4 / 2012-02-23 850 | ================== 851 | 852 | * inline comment typos for #15 853 | * Merge branch 'refs/heads/jeffbski-configErrorStackCompat' 854 | * includeStack documentation for all interfaces 855 | * suite name more generic 856 | * Update test to be compatible with browsers that do not support err.stack 857 | * udpated compiled chai.js and added to browser tests 858 | * Allow inclusion of stack trace for Assert error messages to be configurable 859 | * docs sharing buttons 860 | * sinon-chai link 861 | * doc updates 862 | * read me updates include plugins 863 | 864 | 0.3.3 / 2012-02-12 865 | ================== 866 | 867 | * Merge pull request #14 from jfirebaugh/configurable_properties 868 | * Make Assertion.prototype properties configurable 869 | 870 | 0.3.2 / 2012-02-10 871 | ================== 872 | 873 | * codex version 874 | * docs 875 | * docs cleanup 876 | 877 | 0.3.1 / 2012-02-07 878 | ================== 879 | 880 | * node 0.4.x compat 881 | 882 | 0.3.0 / 2012-02-07 883 | ================== 884 | 885 | * Merge branch 'feature/03x' 886 | * browser build 887 | * remove html/json/headers testign 888 | * regex error.message testing 889 | * tests for using plugins 890 | * Merge pull request #11 from domenic/master 891 | * Make `chai.use` a no-op if the function has already been used. 892 | 893 | 0.2.4 / 2012-02-02 894 | ================== 895 | 896 | * added in past tense switch for `been` 897 | 898 | 0.2.3 / 2012-02-01 899 | ================== 900 | 901 | * try that again 902 | 903 | 0.2.2 / 2012-02-01 904 | ================== 905 | 906 | * added `been` (past of `be`) alias 907 | 908 | 0.2.1 / 2012-01-29 909 | ================== 910 | 911 | * added Throw, with a capital T, as an alias to `throw` (#7) 912 | 913 | 0.2.0 / 2012-01-26 914 | ================== 915 | 916 | * update gitignore for vim *.swp 917 | * Merge branch 'feature/plugins' 918 | * browser build 919 | * interfaces now work with use 920 | * simple .use function. See #9. 921 | * readme notice on browser compat 922 | 923 | 0.1.7 / 2012-01-25 924 | ================== 925 | 926 | * added assert tests to browser test runner 927 | * browser update 928 | * `should` interface patch for primitives support in FF 929 | * fix isObject() Thanks @milewise 930 | * travis only on branch `master` 931 | * add instanceof alias `instanceOf`. #6 932 | * some tests for assert module 933 | 934 | 0.1.6 / 2012-01-02 935 | ================== 936 | 937 | * commenting for assert interface 938 | * updated codex dep 939 | 940 | 0.1.5 / 2012-01-02 941 | ================== 942 | 943 | * browser tests pass 944 | * type in should.not.equal 945 | * test for should (not) exist 946 | * added should.exist and should.not.exist 947 | * browser uses tdd 948 | * convert tests to tdd 949 | 950 | 0.1.4 / 2011-12-26 951 | ================== 952 | 953 | * browser lib update for new assert interface compatiblitiy 954 | * inspect typos 955 | * added strict equal + negatives and ifError 956 | * interface assert had doesNotThrow 957 | * added should tests to browser 958 | * new expect empty tests 959 | * should test browser compat 960 | * Fix typo for instanceof docs. Closes #3 [ci skip] 961 | 962 | 0.1.3 / 2011-12-18 963 | ================== 964 | 965 | * much cleaner reporting string on error. 966 | 967 | 0.1.2 / 2011-12-18 968 | ================== 969 | 970 | * [docs] for upcoming 0.1.2 971 | * browser version built with pre/suffix … all tests passing 972 | * make / compile now use prefix/suffix correctly 973 | * code clean 974 | * prefix/suffix to wrap browser output to prevent conflicts with other `require` methods. 975 | * Merge branch 'feature/should4xcompatibility' 976 | * compile for browser tests.. all pass 977 | * added header/status/html/json 978 | * throw tests 979 | * should.throw & should.not.throw shortcuts 980 | * improved `throw` type detection and messaging 981 | * contain is now `include` … keys modifier is now `contain` 982 | * removed object() test 983 | * removed #respondTo 984 | * Merge branch 'bug/2' 985 | * replaced __defineGetter__ with defineProperty for all uses 986 | * [docs] change mp tracking code 987 | * docs site updated with assert (TDD) interface 988 | * updated doc comments for assert interface 989 | 990 | 0.1.1 / 2011-12-16 991 | ================== 992 | 993 | * docs ready for upcoming 0.1.1 994 | * readme image fixed [ci skip] 995 | * more readme tweaks [ci skip] 996 | * réadmet image fixed [ci skip] 997 | * documentation 998 | * codex locked in version 0.0.5 999 | * more comments to assertions for docs 1000 | * assertions fully commented, browser library updated 1001 | * adding codex as doc dependancy 1002 | * prepping for docs 1003 | * assertion component completely commented for documentation 1004 | * added exist test 1005 | * var expect outside of browser if check 1006 | * added keywords to package.json 1007 | 1008 | 0.1.0 / 2011-12-15 1009 | ================== 1010 | 1011 | * failing on purpose successful .. back to normal 1012 | * testing travis failure 1013 | * assert#arguments getter 1014 | * readme typo 1015 | * updated README 1016 | * added travis and npmignore 1017 | * copyright notices … think i got them all 1018 | * moved expect interface to own file for consistency 1019 | * assert ui deepEqual 1020 | * browser tests expect (all working) 1021 | * browser version built 1022 | * chai.fail (should ui) 1023 | * expect tests browser compatible 1024 | * tests for should and expect (all pass) 1025 | * moved fail to primary export 1026 | * should compatibility testing 1027 | * within, greaterThan, object, keys, 1028 | * Aliases 1029 | * Assertion#property now correctly works with negate and undefined values 1030 | * error message language matches should 1031 | * Assertion#respondTo 1032 | * Assertion now uses inspect util 1033 | * git ignore node modules 1034 | * should is exported 1035 | * AssertionError __proto__ from Error.prototype 1036 | * add should interface for should.js compatibility 1037 | * moved eql to until folder and added inspect from (joyent/node) 1038 | * added mocha for testing 1039 | * browser build for current api 1040 | * multiple .property assertions 1041 | * added deep equal from node 1042 | 1043 | 0.0.2 / 2011-12-07 1044 | ================== 1045 | 1046 | * cleaner output on error 1047 | * improved exists detection 1048 | * package remnant artifact 1049 | * empty deep equal 1050 | * test browser build 1051 | * assertion cleanup 1052 | * client compile script 1053 | * makefile 1054 | * most of the basic assertions 1055 | * allow no parameters to assertion error 1056 | * name change 1057 | * assertion error instance 1058 | * main exports: assert() & expect() 1059 | * initialize 1060 | -------------------------------------------------------------------------------- /bower_components/mocha/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2.4.5 / 2016-01-28 2 | ================== 3 | 4 | * [#2080], [#2078], [#2072], [#2073], [#1200] - Revert changes to console colors in changeset [1192914](https://github.com/mochajs/mocha/commit/119291449cd03a11cdeda9e37cf718a69a012896) and subsequent related changes thereafter. Restores compatibility with IE8 & PhantomJS. See also [mantoni/mochify.js#129](https://github.com/mantoni/mochify.js/issues/129) and [openlayers/ol3#4746](https://github.com/openlayers/ol3/pull/4746) ([@boneskull]) 5 | * [#2082] - Fix several test assertions ([@mislav]) 6 | 7 | [#1200]: https://github.com/mochajs/mocha/issues/1200 8 | [#2082]: https://github.com/mochajs/mocha/pull/2082 9 | 10 | 2.4.4 / 2016-01-27 11 | ================== 12 | 13 | * [#2080] - Fix broken RequireJS compatibility ([@boneskull]) 14 | 15 | [#2080]: https://github.com/mochajs/mocha/issues/2080 16 | 17 | 2.4.3 / 2016-01-27 18 | ================== 19 | 20 | * [#2078] - Fix broken IE8 ([@boneskull]) 21 | 22 | [#2078]: https://github.com/mochajs/mocha/issues/2078 23 | 24 | 2.4.2 / 2016-01-26 25 | ================== 26 | 27 | * [#2053] - Fix web worker compatibility ([@mislav]) 28 | * [#2072] - Fix Windows color output ([@thedark1337]) 29 | * [#2073] - Fix colors in `progress` and `landing` reporters ([@gyandeeps]) 30 | 31 | [#2053]: https://github.com/mochajs/mocha/pull/2053 32 | [#2072]: https://github.com/mochajs/mocha/pull/2072 33 | [#2073]: https://github.com/mochajs/mocha/pull/2073 34 | [@gyandeeps]: https://github.com/gyandeeps 35 | [@thedark1337]: https://github.com/thedark1337 36 | 37 | 2.4.1 / 2016-01-26 38 | ================== 39 | 40 | * [#2067] - Fix HTML/doc reporter regressions ([@danielstjules]) 41 | 42 | [#2067]: https://github.com/mochajs/mocha/pull/2067 43 | 44 | 2.4.0 / 2016-01-25 45 | ================== 46 | 47 | * [#1945] - Correctly skip tests when skipping in suite's before() ([@ryanshawty]) 48 | * [#2056] - chore(license): update license year to 2016 ([@pra85]) 49 | * [#2048] - Fix `this.skip` from spec with HTML reporter ([@mislav]) 50 | * [#2033] - Update tests for newer versions of should.js ([@tomhughes]) 51 | * [#2037] - Fix for memory leak caused by referenced to deferred test ([@bd82]) 52 | * [#2038] - Also run Travis-CI on node.js 4 & 5 ([@bd82]) 53 | * [#2028] - Remove reference to test before afterAll hook runs ([@stonelgh]) 54 | * Bump mkdirp to 0.5.1 to support strict mode ([@danielstjules]) 55 | * [#1977] - safely stringify PhantomJS undefined value ([@ahamid]) 56 | * Add the ability to retry tests ([@@longlho]) 57 | * [#1982] - Enable --log-timer-events option [@Alaneor] 58 | * Fix #1980: Load mocha.opts from bin/mocha and bin/_mocha ([@danielstjules]) 59 | * [#1976] - Simplify function call ([@iclanzan]) 60 | * [#1963] - Add support --perf-basic-prof ([@robraux]) 61 | * [#1981] - Fix HTML reporter handling of done and exceptions ([@Standard8]) 62 | * [#1993] - propagate "file" property for "exports" interface ([@segrey]) 63 | * [#1999] - Add support for strict mode ([@tmont]) 64 | * [#2005] - XUnit Reporter Writes to stdout, falls back to console.log ([@jonnyreeves]) 65 | * [#2021] - Fix non ES5 compliant regexp ([@zetaben]) 66 | * [#1965] - Don't double install BDD UI ([@cowboyd]) 67 | * [#1995] - Make sure the xunit output dir exists before writing to it ([@ianwremmel]) 68 | * Use chalk for the base reporter colors; closes #1200 ([@boneskull]) 69 | * Fix requiring custom interfaces ([@jgkim]) 70 | * [#1967] Silence Bluebird js warnings ([@krisr]) 71 | 72 | [#1945]: https://github.com/mochajs/mocha/pull/1945 73 | [#2056]: https://github.com/mochajs/mocha/pull/2056 74 | [#2048]: https://github.com/mochajs/mocha/pull/2048 75 | [#2033]: https://github.com/mochajs/mocha/pull/2033 76 | [#2037]: https://github.com/mochajs/mocha/pull/2037 77 | [#2038]: https://github.com/mochajs/mocha/pull/2038 78 | [#2028]: https://github.com/mochajs/mocha/pull/2028 79 | [#1977]: https://github.com/mochajs/mocha/pull/1977 80 | [#1982]: https://github.com/mochajs/mocha/pull/1982 81 | [#1976]: https://github.com/mochajs/mocha/pull/1976 82 | [#1963]: https://github.com/mochajs/mocha/pull/1963 83 | [#1981]: https://github.com/mochajs/mocha/pull/1981 84 | [#1993]: https://github.com/mochajs/mocha/pull/1993 85 | [#1999]: https://github.com/mochajs/mocha/pull/1999 86 | [#2005]: https://github.com/mochajs/mocha/pull/2005 87 | [#2021]: https://github.com/mochajs/mocha/pull/2021 88 | [1965#]: https://github.com/mochajs/mocha/pull/1965 89 | [#1995]: https://github.com/mochajs/mocha/pull/1995 90 | [#1967]: https://github.com/mochajs/mocha/pull/1967 91 | [@ryanshawty]: https://github.com/ryanshawty 92 | [@pra85]: https://github.com/pra85 93 | [@mislav]: https://github.com/mislav 94 | [@tomhughes]: https://github.com/tomhughes 95 | [@bd82]: https://github.com/bd82 96 | [@stonelgh]: https://github.com/stonelgh 97 | [@danielstjules]: https://github.com/danielstjules 98 | [@ahamid]: https://github.com/ahamid 99 | [@longlho]: https://github.com/longlho 100 | [@Alaneor]: https://github.com/Alaneor 101 | [@iclanzan]: https://github.com/iclanzan 102 | [@robraux]: https://github.com/robraux 103 | [@Standard8]: https://github.com/Standard8 104 | [@segrey]: https://github.com/segrey 105 | [@tmont]: https://github.com/tmont 106 | [@jonnyreeves]: https://github.com/jonnyreeves 107 | [@zetaben]: https://github.com/zetaben 108 | [@cowboyd]: https://github.com/cowboyd 109 | [@ianwremmel]: https://github.com/ianwremmel 110 | [@boneskull]: https://github.com/boneskull 111 | [@jgkim]: https://github.com/jgkim 112 | [@krisr]: https://github.com/krisr 113 | 114 | 2.3.4 / 2015-11-15 115 | ================== 116 | 117 | * Update debug dependency to 2.2.0 118 | * remove duplication of mocha.opts on process.argv 119 | * Fix typo in test/reporters/nyan.js 120 | 121 | 2.3.3 / 2015-09-19 122 | ================== 123 | 124 | * [#1875] - Fix Markdown reporter exceeds maximum call stack size ([@danielstjules]) 125 | * [#1864] - Fix xunit missing output with --reporter-options output ([@danielstjules]) 126 | * [#1846] - Support all harmony flags ([@danielstjules]) 127 | * Fix fragile xunit reporter spec ([@danielstjules]) 128 | * [#1669] - Fix catch uncaught errors outside test suite execution ([@danielstjules]) 129 | * [#1868] - Revert jade to support npm < v1.3.7 ([@danielstjules]) 130 | * [#1766] - Don't remove modules/components from stack trace in the browser ([@danielstjules]) 131 | * [#1798] - Fix correctly attribute mutiple done err with hooks ([@danielstjules]) 132 | * Fix use utils.reduce for IE8 compatibility ([@wsw0108]) 133 | * Some linting errors fixed by [@danielstjules] 134 | * Call the inspect() function if message is not set ([@kevinburke]) 135 | 136 | [#1875]: https://github.com/mochajs/mocha/issues/1875 137 | [#1864]: https://github.com/mochajs/mocha/issues/1864 138 | [#1846]: https://github.com/mochajs/mocha/issues/1846 139 | [#1669]: https://github.com/mochajs/mocha/issues/1669 140 | [#1868]: https://github.com/mochajs/mocha/issues/1868 141 | [#1766]: https://github.com/mochajs/mocha/issues/1766 142 | [#1798]: https://github.com/mochajs/mocha/issues/1798 143 | [@danielstjules]: https://github.com/danielstjules 144 | [@wsw0108]: https://github.com/wsw0108 145 | [@kevinburke]: https://github.com/kevinburke 146 | 147 | 2.3.2 / 2015-09-07 148 | ================== 149 | * [#1868] - Fix compatibility with older versions of NPM ([@boneskull]) 150 | 151 | [#1868]: https://github.com/mochajs/mocha/issues/1868 152 | 153 | 2.3.1 / 2015-09-06 154 | ================== 155 | 156 | * [#1812] - Fix: Bail flag causes before() hooks to be run even after a failure ([@aaroncrows]) 157 | 158 | [#1812]: https://github.com/mochajs/mocha/issues/1812 159 | [aaroncrows]: https://github.com/aaroncrows 160 | 161 | 2.3.0 / 2015-08-30 162 | ================== 163 | 164 | * [#553] - added --allowUncaught option ([@amsul]) 165 | * [#1490] - Allow --async-only to be satisfied by returning a promise ([@jlai]) 166 | * [#1829] - support --max-old-space-size ([@gigadude]) 167 | * [#1811] - upgrade Jade dependency ([@outsideris]) 168 | * [#1769] - Fix async hook error handling ([@ajaykodali]) 169 | * [#1230] - More descriptive beforeEach/afterEach messages ([@duncanbeevers]) 170 | * [#1787] - Scope loading behaviour instead of using early return ([@aryeguy]) 171 | * [#1789] - Fix: html-runner crashing ([@sunesimonsen]) 172 | * [#1749] - Fix maximum call stack error on large amount of tests ([@tinganho]) 173 | * [#1230] - Decorate failed hook titles with test title ([@duncanbeevers]) 174 | * [#1260] - Build using Browserify ([@ndhoule]) 175 | * [#1728] - Don't use `__proto__` ([@ndhoule]) 176 | * [#1781] - Fix hook error tests ([@glenjamin]) 177 | * [#1754] - Allow boolean --reporter-options ([@papandreou]) 178 | * [#1766] - Fix overly aggressive stack suppression ([@moll]) 179 | * [#1752] - Avoid potential infinite loop ([@gsilk]) 180 | * [#1761] - Fix problems running under PhantomJS ([@chromakode]) 181 | * [#1700] - Fix more problems running under PhantomJS ([@jbnicolai]) 182 | * [#1774] - Support escaped spaces in CLI options ([@adamgruber]) 183 | * [#1687] - Fix HTML reporter links with special chars ([@benvinegar]) 184 | * [#1359] - Adopt code style and enforce it using ESLint ([@ndhoule] w/ assist from [@jbnicolai] & [@boneskull]) 185 | * various refactors ([@jbnicolai]) 186 | * [#1758] - Add cross-frame compatible Error checking ([@outdooricon]) 187 | * [#1741] - Remove moot `version` property from bower.json ([@kkirsche]) 188 | * [#1739] - Improve `HISTORY.md` ([@rstacruz]) 189 | * [#1730] - Support more io.js flags ([@ryedog]) 190 | * [#1349] - Allow HTML in HTML reporter errors ([@papandreou] / [@sunesimonsen]) 191 | * [#1572] - Prevent default browser behavior for failure/pass links ([@jschilli]) 192 | * [#1630] - Support underscored harmony flags ([@dominicbarnes]) 193 | * [#1718] - Support more harmony flags ([@slyg]) 194 | * [#1689] - Add stack to JSON-stream reporter ([@jonathandelgado]) 195 | * [#1654] - Fix `ReferenceError` "location is not defined" ([@jakemmarsh]) 196 | 197 | [#553]: https://github.com/mochajs/mocha/issues/553 198 | [#1490]: https://github.com/mochajs/mocha/issues/1490 199 | [#1829]: https://github.com/mochajs/mocha/issues/1829 200 | [#1811]: https://github.com/mochajs/mocha/issues/1811 201 | [#1769]: https://github.com/mochajs/mocha/issues/1769 202 | [#1230]: https://github.com/mochajs/mocha/issues/1230 203 | [#1787]: https://github.com/mochajs/mocha/issues/1787 204 | [#1789]: https://github.com/mochajs/mocha/issues/1789 205 | [#1749]: https://github.com/mochajs/mocha/issues/1749 206 | [#1230]: https://github.com/mochajs/mocha/issues/1230 207 | [#1260]: https://github.com/mochajs/mocha/issues/1260 208 | [#1728]: https://github.com/mochajs/mocha/issues/1728 209 | [#1781]: https://github.com/mochajs/mocha/issues/1781 210 | [#1754]: https://github.com/mochajs/mocha/issues/1754 211 | [#1766]: https://github.com/mochajs/mocha/issues/1766 212 | [#1752]: https://github.com/mochajs/mocha/issues/1752 213 | [#1761]: https://github.com/mochajs/mocha/issues/1761 214 | [#1700]: https://github.com/mochajs/mocha/issues/1700 215 | [#1774]: https://github.com/mochajs/mocha/issues/1774 216 | [#1687]: https://github.com/mochajs/mocha/issues/1687 217 | [#1359]: https://github.com/mochajs/mocha/issues/1359 218 | [#1758]: https://github.com/mochajs/mocha/issues/1758 219 | [#1741]: https://github.com/mochajs/mocha/issues/1741 220 | [#1739]: https://github.com/mochajs/mocha/issues/1739 221 | [#1730]: https://github.com/mochajs/mocha/issues/1730 222 | [#1349]: https://github.com/mochajs/mocha/issues/1349 223 | [#1572]: https://github.com/mochajs/mocha/issues/1572 224 | [#1630]: https://github.com/mochajs/mocha/issues/1630 225 | [#1718]: https://github.com/mochajs/mocha/issues/1718 226 | [#1689]: https://github.com/mochajs/mocha/issues/1689 227 | [#1654]: https://github.com/mochajs/mocha/issues/1654 228 | [@adamgruber]: https://github.com/adamgruber 229 | [@ajaykodali]: https://github.com/ajaykodali 230 | [@amsul]: https://github.com/amsul 231 | [@aryeguy]: https://github.com/aryeguy 232 | [@benvinegar]: https://github.com/benvinegar 233 | [@boneskull]: https://github.com/boneskull 234 | [@chromakode]: https://github.com/chromakode 235 | [@dominicbarnes]: https://github.com/dominicbarnes 236 | [@duncanbeevers]: https://github.com/duncanbeevers 237 | [@gigadude]: https://github.com/gigadude 238 | [@glenjamin]: https://github.com/glenjamin 239 | [@gsilk]: https://github.com/gsilk 240 | [@jakemmarsh]: https://github.com/jakemmarsh 241 | [@jbnicolai]: https://github.com/jbnicolai 242 | [@jlai]: https://github.com/jlai 243 | [@jonathandelgado]: https://github.com/jonathandelgado 244 | [@jschilli]: https://github.com/jschilli 245 | [@kkirsche]: https://github.com/kkirsche 246 | [@moll]: https://github.com/moll 247 | [@ndhoule]: https://github.com/ndhoule 248 | [@outdooricon]: https://github.com/outdooricon 249 | [@outsideris]: https://github.com/outsideris 250 | [@papandreou]: https://github.com/papandreou 251 | [@rstacruz]: https://github.com/rstacruz 252 | [@ryedog]: https://github.com/ryedog 253 | [@slyg]: https://github.com/slyg 254 | [@sunesimonsen]: https://github.com/sunesimonsen 255 | [@tinganho]: https://github.com/tinganho 256 | 257 | 2.2.5 / 2015-05-14 258 | ================== 259 | 260 | * [#1699] - Upgrade jsdiff to v1.4.0 ([@nylen]) 261 | * [#1648] - fix diff background colors in the console ([@nylen]) 262 | * [#1327] - fix tests running twice, a regression issue. ([#1686], [@danielstjules]) 263 | * [#1675] - add integration tests ([@danielstjules]) 264 | * [#1682] - use a valid SPDX license identifier in package.json ([@kemitchell]) 265 | * [#1660] - fix assertion of invalid dates ([#1661], [@a8m]) 266 | * [#1241] - fix issue with multiline diffs appearing as single line ([#1655], [@a8m]) 267 | 268 | [#1699]: https://github.com/mochajs/mocha/issues/1699 269 | [#1648]: https://github.com/mochajs/mocha/issues/1648 270 | [#1327]: https://github.com/mochajs/mocha/issues/1327 271 | [#1686]: https://github.com/mochajs/mocha/issues/1686 272 | [#1675]: https://github.com/mochajs/mocha/issues/1675 273 | [#1682]: https://github.com/mochajs/mocha/issues/1682 274 | [#1660]: https://github.com/mochajs/mocha/issues/1660 275 | [#1661]: https://github.com/mochajs/mocha/issues/1661 276 | [#1241]: https://github.com/mochajs/mocha/issues/1241 277 | [#1655]: https://github.com/mochajs/mocha/issues/1655 278 | [@nylen]: https://github.com/nylen 279 | [@danielstjules]: https://github.com/danielstjules 280 | [@kemitchell]: https://github.com/kemitchell 281 | [@a8m]: https://github.com/a8m 282 | 283 | 2.2.4 / 2015-04-08 284 | ================== 285 | 286 | * Load mocha.opts in _mocha for now (close #1645) 287 | 288 | 2.2.3 / 2015-04-07 289 | ================== 290 | 291 | * fix(reporter/base): string diff - issue #1241 292 | * fix(reporter/base): string diff - issue #1241 293 | * fix(reporter/base): don't show diffs for errors without expectation 294 | * fix(reporter/base): don't assume error message is first line of stack 295 | * improve: dry up reporter/base test 296 | * fix(reporter/base): explicitly ignore showDiff #1614 297 | * Add iojs to travis build 298 | * Pass `--allow-natives-syntax` flag to node. 299 | * Support --harmony_classes flag for io.js 300 | * Fix 1556: Update utils.clean to handle newlines in func declarations 301 | * Fix 1606: fix err handling in IE <= 8 and non-ES5 browsers 302 | * Fix 1585: make _mocha executable again 303 | * chore(package.json): add a8m as a contributor 304 | * Fixed broken link on html-cov reporter 305 | * support --es_staging flag 306 | * fix issue where menu overlaps content. 307 | * update contributors in package.json 308 | * Remove trailing whitespace from reporter output 309 | * Remove contributors list from readme 310 | * log third-party reporter errors 311 | * [Fix] Exclude not own properties when looping on options 312 | * fix: support node args in mocha.opts (close #1573) 313 | * fix(reporter/base): string diff - issue #1241 314 | 315 | 2.2.1 / 2015-03-09 316 | ================== 317 | 318 | * Fix passing of args intended for node/iojs. 319 | 320 | 2.2.0 / 2015-03-06 321 | ================== 322 | 323 | * Update mocha.js 324 | * Add --fgrep. Use grep for RegExp, fgrep for str 325 | * Ignore async global errors after spec resolution 326 | * Fixing errors that prevent mocha.js from loading in the browser - fixes #1558 327 | * fix(utils): issue #1558 + make 328 | * add ability to delay root suite; closes #362, closes #1124 329 | * fix insanity in http tests 330 | * update travis: add node 0.12, add gitter, remove slack 331 | * building 332 | * resolve #1548: ensure the environment's "node" executable is used 333 | * reporters/base: use supports-color to detect colorable term 334 | * travis: use docker containers 335 | * small fix: commander option for --expose-gc 336 | * Ignore asynchronous errors after global failure 337 | * Improve error output when a test fails with a non-error 338 | * updated travis badge, uses svg instead of img 339 | * Allow skip from test context for #332 340 | * [JSHINT] Unnecessary semicolon fixed in bin/_mocha 341 | * Added a reminder about the done() callback to test timeout error messages 342 | * fixes #1496, in Mocha.run(fn), check if fn exists before executing it, added tests too 343 | * Add Harmony Proxy flag for iojs 344 | * test(utils|ms|*): test existing units 345 | * add support for some iojs flags 346 | * fix(utils.stringify): issue #1229, diff viewer 347 | * Remove slack link 348 | * Prevent multiple 'grep=' querystring params in html reporter 349 | * Use grep as regexp (close #1381) 350 | * utils.stringify should handle objects without an Object prototype 351 | * in runnable test, comparing to undefined error's message rather than a literal 352 | * Fix test running output truncation on async STDIO 353 | * ammended for deprecated customFds option in child_process 354 | 355 | 2.1.0 / 2014-12-23 356 | ================== 357 | 358 | * showDiff: don’t stringify strings 359 | * Clean up unused module dependencies. 360 | * Filter zero-length strings from mocha.opts 361 | * only write to stdout in reporters 362 | * Revert "only write to stdout in reporters" 363 | * Print colored output only to a tty 364 | * update summary in README.md 365 | * rename Readme.md/History.md to README.md/HISTORY.md because neurotic 366 | * add .mailmap to fix "git shortlog" or "git summary" output 367 | * fixes #1461: nyan-reporter now respects Base.useColors, fixed bug where Base.color would not return a string when str wasn't a string. 368 | * Use existing test URL builder in failed replay links 369 | * modify .travis.yml: use travis_retry; closes #1449 370 | * fix -t 0 behavior; closes #1446 371 | * fix tests (whoops) 372 | * improve diff behavior 373 | * Preserve pathname when linking to individual tests 374 | * Fix test 375 | * Tiny typo in comments fixed 376 | * after hooks now being called on failed tests when using bail, fixes #1093 377 | * fix throwing undefined/null now makes tests fail, fixes #1395 378 | * compiler extensions are added as watched extensions, removed non-standard extensions from watch regex, resolves #1221 379 | * prefix/namespace for suite titles in markdown reporter, fixes #554 380 | * fix more bad markdown in CONTRIBUTING.md 381 | * fix bad markdown in CONTRIBUTING.md 382 | * add setImmediate/clearImmediate to globals; closes #1435 383 | * Fix buffer diffs (closes #1132, closes #1433) 384 | * add a CONTRIBUTING.md. closes #882 385 | * fix intermittent build failures (maybe). closes #1407 386 | * add Slack notification to .travis.yml 387 | * Fix slack link 388 | * Add slack room to readme 389 | * Update maintainers 390 | * update maintainers and contributors 391 | * resolves #1393: kill children with more effort on SIGINT 392 | * xunit reporter support for optionally writing to a file 393 | * if a reporter has a .done method, call it before exiting 394 | * add support for reporter options 395 | * only write to stdout in reporters 396 | 397 | 2.0.0 / 2014-10-21 398 | ================== 399 | 400 | * remove: support for node 0.6.x, 0.4.x 401 | * fix: landing reporter with non ansi characters (#211) 402 | * fix: html reporter - preserve query params when navigating to suites/tests (#1358) 403 | * fix: json stream reporter add error message to failed test 404 | * fix: fixes for visionmedia -> mochajs 405 | * fix: use stdio, fixes node deprecation warnings (#1391) 406 | 407 | 1.21.5 / 2014-10-11 408 | ================== 409 | 410 | * fix: build for NodeJS v0.6.x 411 | * fix: do not attempt to highlight syntax when non-HTML reporter is used 412 | * update: escape-string-regexp to 1.0.2. 413 | * fix: botched indentation in canonicalize() 414 | * fix: .gitignore: ignore .patch and .diff files 415 | * fix: changed 'Catched' to 'Caught' in uncaught exception error handler messages 416 | * add: `pending` field for json reporter 417 | * fix: Runner.prototype.uncaught: don't double-end runnables that already have a state. 418 | * fix: --recursive, broken by f0facd2e 419 | * update: replaces escapeRegexp with the escape-string-regexp package. 420 | * update: commander to 2.3.0. 421 | * update: diff to 1.0.8. 422 | * fix: ability to disable syntax highlighting (#1329) 423 | * fix: added empty object to errorJSON() call to catch when no error is present 424 | * fix: never time out after calling enableTimeouts(false) 425 | * fix: timeout(0) will work at suite level (#1300) 426 | * Fix for --watch+only() issue (#888 ) 427 | * fix: respect err.showDiff, add Base reporter test (#810) 428 | 429 | 1.22.1-3 / 2014-07-27 430 | ================== 431 | 432 | * fix: disabling timeouts with this.timeout(0) (#1301) 433 | 434 | 1.22.1-3 / 2014-07-27 435 | ================== 436 | 437 | * fix: local uis and reporters (#1288) 438 | * fix: building 1.21.0's changes in the browser (#1284) 439 | 440 | 1.21.0 / 2014-07-23 441 | ================== 442 | 443 | * add: --no-timeouts option (#1262, #1268) 444 | * add: --*- deprecation node flags (#1217) 445 | * add: --watch-extensions argument (#1247) 446 | * change: spec reporter is default (#1228) 447 | * fix: diff output showing incorrect +/- (#1182) 448 | * fix: diffs of circular structures (#1179) 449 | * fix: re-render the progress bar when progress has changed only (#1151) 450 | * fix support for environments with global and window (#1159) 451 | * fix: reverting to previously defined onerror handler (#1178) 452 | * fix: stringify non error objects passed to done() (#1270) 453 | * fix: using local ui, reporters (#1267) 454 | * fix: cleaning es6 arrows (#1176) 455 | * fix: don't include attrs in failure tag for xunit (#1244) 456 | * fix: fail tests that return a promise if promise is rejected w/o a reason (#1224) 457 | * fix: showing failed tests in doc reporter (#1117) 458 | * fix: dot reporter dots being off (#1204) 459 | * fix: catch empty throws (#1219) 460 | * fix: honoring timeout for sync operations (#1242) 461 | * update: growl to 1.8.0 462 | 463 | 1.20.1 / 2014-06-03 464 | ================== 465 | 466 | * update: should dev dependency to ~4.0.0 (#1231) 467 | 468 | 1.20.0 / 2014-05-28 469 | ================== 470 | 471 | * add: filenames to suite objects (#1222) 472 | 473 | 1.19.0 / 2014-05-17 474 | ================== 475 | 476 | * add: browser script option to package.json 477 | * add: export file in Mocha.Test objects (#1174) 478 | * add: add docs for wrapped node flags 479 | * fix: mocha.run() to return error status in browser (#1216) 480 | * fix: clean() to show failure details (#1205) 481 | * fix: regex that generates html for new keyword (#1201) 482 | * fix: sibling suites have inherited but separate contexts (#1164) 483 | 484 | 485 | 1.18.2 / 2014-03-18 486 | ================== 487 | 488 | * fix: html runner was prevented from using #mocha as the default root el (#1162) 489 | 490 | 1.18.1 / 2014-03-18 491 | ================== 492 | 493 | * fix: named before/after hooks in bdd, tdd, qunit interfaces (#1161) 494 | 495 | 1.18.0 / 2014-03-13 496 | ================== 497 | 498 | * add: promise support (#329) 499 | * add: named before/after hooks (#966) 500 | 501 | 1.17.1 / 2014-01-22 502 | ================== 503 | 504 | * fix: expected messages in should.js (should.js#168) 505 | * fix: expect errno global in node versions < v0.9.11 (#1111) 506 | * fix: unreliable checkGlobals optimization (#1110) 507 | 508 | 1.17.0 / 2014-01-09 509 | ================== 510 | 511 | * add: able to require globals (describe, it, etc.) through mocha (#1077) 512 | * fix: abort previous run on --watch change (#1100) 513 | * fix: reset context for each --watch triggered run (#1099) 514 | * fix: error when cli can't resolve path or pattern (#799) 515 | * fix: canonicalize objects before stringifying and diffing them (#1079) 516 | * fix: make CR call behave like carriage return for non tty (#1087) 517 | 518 | 519 | 1.16.2 / 2013-12-23 520 | ================== 521 | 522 | * fix: couple issues with ie 8 (#1082, #1081) 523 | * fix: issue running the xunit reporter in browsers (#1068) 524 | * fix: issue with firefox < 3.5 (#725) 525 | 526 | 527 | 1.16.1 / 2013-12-19 528 | ================== 529 | 530 | * fix: recompiled for missed changes from the last release 531 | 532 | 533 | 1.16.0 / 2013-12-19 534 | ================== 535 | 536 | * add: Runnable.globals(arr) for per test global whitelist (#1046) 537 | * add: mocha.throwError(err) for assertion libs to call (#985) 538 | * remove: --watch's spinner (#806) 539 | * fix: duplicate test output for multi-line specs in spec reporter (#1006) 540 | * fix: gracefully exit on SIGINT (#1063) 541 | * fix expose the specified ui only in the browser (#984) 542 | * fix: ensure process exit code is preserved when using --no-exit (#1059) 543 | * fix: return true from window.onerror handler (#868) 544 | * fix: xunit reporter to use process.stdout.write (#1068) 545 | * fix: utils.clean(str) indentation (#761) 546 | * fix: xunit reporter returning test duration a NaN (#1039) 547 | 548 | 1.15.1 / 2013-12-03 549 | ================== 550 | 551 | * fix: recompiled for missed changes from the last release 552 | 553 | 1.15.0 / 2013-12-02 554 | ================== 555 | 556 | * add: `--no-exit` to prevent `process.exit()` (#1018) 557 | * fix: using inline diffs (#1044) 558 | * fix: show pending test details in xunit reporter (#1051) 559 | * fix: faster global leak detection (#1024) 560 | * fix: yui compression (#1035) 561 | * fix: wrapping long lines in test results (#1030, #1031) 562 | * fix: handle errors in hooks (#1043) 563 | 564 | 1.14.0 / 2013-11-02 565 | ================== 566 | 567 | * add: unified diff (#862) 568 | * add: set MOCHA_COLORS env var to use colors (#965) 569 | * add: able to override tests links in html reporters (#776) 570 | * remove: teamcity reporter (#954) 571 | * update: commander dependency to 2.0.0 (#1010) 572 | * fix: mocha --ui will try to require the ui if not built in, as --reporter does (#1022) 573 | * fix: send cursor commands only if isatty (#184, #1003) 574 | * fix: include assertion message in base reporter (#993, #991) 575 | * fix: consistent return of it, it.only, and describe, describe.only (#840) 576 | 577 | 1.13.0 / 2013-09-15 578 | ================== 579 | 580 | * add: sort test files with --sort (#813) 581 | * update: diff depedency to 1.0.7 582 | * update: glob dependency to 3.2.3 (#927) 583 | * fix: diffs show whitespace differences (#976) 584 | * fix: improve global leaks (#783) 585 | * fix: firefox window.getInterface leak 586 | * fix: accessing iframe via window[iframeIndex] leak 587 | * fix: faster global leak checking 588 | * fix: reporter pending css selector (#970) 589 | 590 | 1.12.1 / 2013-08-29 591 | ================== 592 | 593 | * remove test.js from .gitignore 594 | * update included version of ms.js 595 | 596 | 1.12.0 / 2013-07-01 597 | ================== 598 | 599 | * add: prevent diffs for differing types. Closes #900 600 | * add `Mocha.process` hack for phantomjs 601 | * fix: use compilers with requires 602 | * fix regexps in diffs. Closes #890 603 | * fix xunit NaN on failure. Closes #894 604 | * fix: strip tab indentation in `clean` utility method 605 | * fix: textmate bundle installation 606 | 607 | 1.11.0 / 2013-06-12 608 | ================== 609 | 610 | * add --prof support 611 | * add --harmony support 612 | * add --harmony-generators support 613 | * add "Uncaught " prefix to uncaught exceptions 614 | * add web workers support 615 | * add `suite.skip()` 616 | * change to output # of pending / passing even on failures. Closes #872 617 | * fix: prevent hooks from being called if we are bailing 618 | * fix `this.timeout(0)` 619 | 620 | 1.10.0 / 2013-05-21 621 | ================== 622 | 623 | * add add better globbing support for windows via `glob` module 624 | * add support to pass through flags such as --debug-brk=1234. Closes #852 625 | * add test.only, test.skip to qunit interface 626 | * change to always use word-based diffs for now. Closes #733 627 | * change `mocha init` tests.html to index.html 628 | * fix `process` global leak in the browser 629 | * fix: use resolve() instead of join() for --require 630 | * fix: filterLeaks() condition to not consider indices in global object as leaks 631 | * fix: restrict mocha.css styling to #mocha id 632 | * fix: save timer references to avoid Sinon interfering in the browser build. 633 | 634 | 1.9.0 / 2013-04-03 635 | ================== 636 | 637 | * add improved setImmediate implementation 638 | * replace --ignore-leaks with --check-leaks 639 | * change default of ignoreLeaks to true. Closes #791 640 | * remove scrolling for HTML reporter 641 | * fix retina support 642 | * fix tmbundle, restrict to js scope 643 | 644 | 1.8.2 / 2013-03-11 645 | ================== 646 | 647 | * add `setImmediate` support for 0.10.x 648 | * fix mocha -w spinner on windows 649 | 650 | 1.8.1 / 2013-01-09 651 | ================== 652 | 653 | * fix .bail() arity check causing it to default to true 654 | 655 | 1.8.0 / 2013-01-08 656 | ================== 657 | 658 | * add Mocha() options bail support 659 | * add `Mocha#bail()` method 660 | * add instanceof check back for inheriting from Error 661 | * add component.json 662 | * add diff.js to browser build 663 | * update growl 664 | * fix TAP reporter failures comment :D 665 | 666 | 1.7.4 / 2012-12-06 667 | ================== 668 | 669 | * add total number of passes and failures to TAP 670 | * remove .bind() calls. re #680 671 | * fix indexOf. Closes #680 672 | 673 | 1.7.3 / 2012-11-30 674 | ================== 675 | 676 | * fix uncaught error support for the browser 677 | * revert uncaught "fix" which breaks node 678 | 679 | 1.7.2 / 2012-11-28 680 | ================== 681 | 682 | * fix uncaught errors to expose the original error message 683 | 684 | 1.7.0 / 2012-11-07 685 | ================== 686 | 687 | * add `--async-only` support to prevent false positives for missing `done()` 688 | * add sorting by filename in code coverage 689 | * add HTML 5 doctype to browser template. 690 | * add play button to html reporter to rerun a single test 691 | * add `this.timeout(ms)` as Suite#timeout(ms). Closes #599 692 | * update growl dependency to 1.6.x 693 | * fix encoding of test-case ?grep. Closes #637 694 | * fix unicode chars on windows 695 | * fix dom globals in Opera/IE. Closes #243 696 | * fix markdown reporter a tags 697 | * fix `this.timeout("5s")` support 698 | 699 | 1.6.0 / 2012-10-02 700 | ================== 701 | 702 | * add object diffs when `err.showDiff` is present 703 | * add hiding of empty suites when pass/failures are toggled 704 | * add faster `.length` checks to `checkGlobals()` before performing the filter 705 | 706 | 1.5.0 / 2012-09-21 707 | ================== 708 | 709 | * add `ms()` to `.slow()` and `.timeout()` 710 | * add `Mocha#checkLeaks()` to re-enable global leak checks 711 | * add `this.slow()` option [aheckmann] 712 | * add tab, CR, LF to error diffs for now 713 | * add faster `.checkGlobals()` solution [guille] 714 | * remove `fn.call()` from reduce util 715 | * remove `fn.call()` from filter util 716 | * fix forEach. Closes #582 717 | * fix relaying of signals [TooTallNate] 718 | * fix TAP reporter grep number 719 | 720 | 1.4.2 / 2012-09-01 721 | ================== 722 | 723 | * add support to multiple `Mocha#globals()` calls, and strings 724 | * add `mocha.reporter()` constructor support [jfirebaugh] 725 | * add `mocha.timeout()` 726 | * move query-string parser to utils.js 727 | * move highlight code to utils.js 728 | * fix third-party reporter support [exogen] 729 | * fix client-side API to match node-side [jfirebaugh] 730 | * fix mocha in iframe [joliss] 731 | 732 | 1.4.1 / 2012-08-28 733 | ================== 734 | 735 | * add missing `Markdown` export 736 | * fix `Mocha#grep()`, escape regexp strings 737 | * fix reference error when `devicePixelRatio` is not defined. Closes #549 738 | 739 | 1.4.0 / 2012-08-22 740 | ================== 741 | 742 | * add mkdir -p to `mocha init`. Closes #539 743 | * add `.only()`. Closes #524 744 | * add `.skip()`. Closes #524 745 | * change str.trim() to use utils.trim(). Closes #533 746 | * fix HTML progress indicator retina display 747 | * fix url-encoding of click-to-grep HTML functionality 748 | 749 | 1.3.2 / 2012-08-01 750 | ================== 751 | 752 | * fix exports double-execution regression. Closes #531 753 | 754 | 1.3.1 / 2012-08-01 755 | ================== 756 | 757 | * add passes/failures toggling to HTML reporter 758 | * add pending state to `xit()` and `xdescribe()` [Brian Moore] 759 | * add the @charset "UTF-8"; to fix #522 with FireFox. [Jonathan Creamer] 760 | * add border-bottom to #stats links 761 | * add check for runnable in `Runner#uncaught()`. Closes #494 762 | * add 0.4 and 0.6 back to travis.yml 763 | * add `-E, --growl-errors` to growl on failures only 764 | * add prefixes to debug() names. Closes #497 765 | * add `Mocha#invert()` to js api 766 | * change dot reporter to use sexy unicode dots 767 | * fix error when clicking pending test in HTML reporter 768 | * fix `make tm` 769 | 770 | 1.3.0 / 2012-07-05 771 | ================== 772 | 773 | * add window scrolling to `HTML` reporter 774 | * add v8 `--trace-*` option support 775 | * add support for custom reports via `--reporter MODULE` 776 | * add `--invert` switch to invert `--grep` matches 777 | * fix export of `Nyan` reporter. Closes #495 778 | * fix escaping of `HTML` suite titles. Closes #486 779 | * fix `done()` called multiple times with an error test 780 | * change `--grep` - regexp escape the input 781 | 782 | 1.2.2 / 2012-06-28 783 | ================== 784 | 785 | * Added 0.8.0 support 786 | 787 | 1.2.1 / 2012-06-25 788 | ================== 789 | 790 | * Added `this.test.error(err)` support to after each hooks. Closes #287 791 | * Added: export top-level suite on global mocha object (mocha.suite). Closes #448 792 | * Fixed `js` code block format error in markdown reporter 793 | * Fixed deprecation warning when using `path.existsSync` 794 | * Fixed --globals with wildcard 795 | * Fixed chars in nyan when his head moves back 796 | * Remove `--growl` from test/mocha.opts. Closes #289 797 | 798 | 1.2.0 / 2012-06-17 799 | ================== 800 | 801 | * Added `nyan` reporter [Atsuya Takagi] 802 | * Added `mocha init ` to copy client files 803 | * Added "specify" synonym for "it" [domenic] 804 | * Added global leak wildcard support [nathanbowser] 805 | * Fixed runner emitter leak. closes #432 806 | * Fixed omission of .js extension. Closes #454 807 | 808 | 1.1.0 / 2012-05-30 809 | ================== 810 | 811 | * Added: check each `mocha(1)` arg for directories to walk 812 | * Added `--recursive` [tricknotes] 813 | * Added `context` for BDD [hokaccha] 814 | * Added styling for new clickable titles 815 | * Added clickable suite titles to HTML reporter 816 | * Added warning when strings are thrown as errors 817 | * Changed: green arrows again in HTML reporter styling 818 | * Changed ul/li elements instead of divs for better copy-and-pasting [joliss] 819 | * Fixed issue #325 - add better grep support to js api 820 | * Fixed: save timer references to avoid Sinon interfering. 821 | 822 | 1.0.3 / 2012-04-30 823 | ================== 824 | 825 | * Fixed string diff newlines 826 | * Fixed: removed mocha.css target. Closes #401 827 | 828 | 1.0.2 / 2012-04-25 829 | ================== 830 | 831 | * Added HTML reporter duration. Closes #47 832 | * Fixed: one postMessage event listener [exogen] 833 | * Fixed: allow --globals to be used multiple times. Closes #100 [brendannee] 834 | * Fixed #158: removes jquery include from browser tests 835 | * Fixed grep. Closes #372 [brendannee] 836 | * Fixed #166 - When grepping don't display the empty suites 837 | * Removed test/browser/style.css. Closes #385 838 | 839 | 1.0.1 / 2012-04-04 840 | ================== 841 | 842 | * Fixed `.timeout()` in hooks 843 | * Fixed: allow callback for `mocha.run()` in client version 844 | * Fixed browser hook error display. Closes #361 845 | 846 | 1.0.0 / 2012-03-24 847 | ================== 848 | 849 | * Added js API. Closes #265 850 | * Added: initial run of tests with `--watch`. Closes #345 851 | * Added: mark `location` as a global on the CS. Closes #311 852 | * Added `markdown` reporter (github flavour) 853 | * Added: scrolling menu to coverage.html. Closes #335 854 | * Added source line to html report for Safari [Tyson Tate] 855 | * Added "min" reporter, useful for `--watch` [Jakub Nešetřil] 856 | * Added support for arbitrary compilers via . Closes #338 [Ian Young] 857 | * Added Teamcity export to lib/reporters/index [Michael Riley] 858 | * Fixed chopping of first char in error reporting. Closes #334 [reported by topfunky] 859 | * Fixed terrible FF / Opera stack traces 860 | 861 | 0.14.1 / 2012-03-06 862 | ================== 863 | 864 | * Added lib-cov to _.npmignore_ 865 | * Added reporter to `mocha.run([reporter])` as argument 866 | * Added some margin-top to the HTML reporter 867 | * Removed jQuery dependency 868 | * Fixed `--watch`: purge require cache. Closes #266 869 | 870 | 0.14.0 / 2012-03-01 871 | ================== 872 | 873 | * Added string diff support for terminal reporters 874 | 875 | 0.13.0 / 2012-02-23 876 | ================== 877 | 878 | * Added preliminary test coverage support. Closes #5 879 | * Added `HTMLCov` reporter 880 | * Added `JSONCov` reporter [kunklejr] 881 | * Added `xdescribe()` and `xit()` to the BDD interface. Closes #263 (docs * Changed: make json reporter output pretty json 882 | * Fixed node-inspector support, swapped `--debug` for `debug` to match node. 883 | needed) 884 | Closes #247 885 | 886 | 0.12.1 / 2012-02-14 887 | ================== 888 | 889 | * Added `npm docs mocha` support [TooTallNate] 890 | * Added a `Context` object used for hook and test-case this. Closes #253 891 | * Fixed `Suite#clone()` `.ctx` reference. Closes #262 892 | 893 | 0.12.0 / 2012-02-02 894 | ================== 895 | 896 | * Added .coffee `--watch` support. Closes #242 897 | * Added support to `--require` files relative to the CWD. Closes #241 898 | * Added quick n dirty syntax highlighting. Closes #248 899 | * Changed: made HTML progress indicator smaller 900 | * Fixed xunit errors attribute [dhendo] 901 | 902 | 0.10.2 / 2012-01-21 903 | ================== 904 | 905 | * Fixed suite count in reporter stats. Closes #222 906 | * Fixed `done()` after timeout error reporting [Phil Sung] 907 | * Changed the 0-based errors to 1 908 | 909 | 0.10.1 / 2012-01-17 910 | ================== 911 | 912 | * Added support for node 0.7.x 913 | * Fixed absolute path support. Closes #215 [kompiro] 914 | * Fixed `--no-colors` option [Jussi Virtanen] 915 | * Fixed Arial CSS typo in the correct file 916 | 917 | 0.10.0 / 2012-01-13 918 | ================== 919 | 920 | * Added `-b, --bail` to exit on first exception [guillermo] 921 | * Added support for `-gc` / `--expose-gc` [TooTallNate] 922 | * Added `qunit`-inspired interface 923 | * Added MIT LICENSE. Closes #194 924 | * Added: `--watch` all .js in the CWD. Closes #139 925 | * Fixed `self.test` reference in runner. Closes #189 926 | * Fixed double reporting of uncaught exceptions after timeout. Closes #195 927 | 928 | 0.8.2 / 2012-01-05 929 | ================== 930 | 931 | * Added test-case context support. Closes #113 932 | * Fixed exit status. Closes #187 933 | * Update commander. Closes #190 934 | 935 | 0.8.1 / 2011-12-30 936 | ================== 937 | 938 | * Fixed reporting of uncaught exceptions. Closes #183 939 | * Fixed error message defaulting [indutny] 940 | * Changed mocha(1) from bash to node for windows [Nathan Rajlich] 941 | 942 | 0.8.0 / 2011-12-28 943 | ================== 944 | 945 | * Added `XUnit` reporter [FeeFighters/visionmedia] 946 | * Added `say(1)` notification support [Maciej Małecki] 947 | * Changed: fail when done() is invoked with a non-Error. Closes #171 948 | * Fixed `err.stack`, defaulting to message. Closes #180 949 | * Fixed: `make tm` mkdir -p the dest. Closes #137 950 | * Fixed mocha(1) --help bin name 951 | * Fixed `-d` for `--debug` support 952 | 953 | 0.7.1 / 2011-12-22 954 | ================== 955 | 956 | * Removed `mocha-debug(1)`, use `mocha --debug` 957 | * Fixed CWD relative requires 958 | * Fixed growl issue on windows [Raynos] 959 | * Fixed: platform specific line endings [TooTallNate] 960 | * Fixed: escape strings in HTML reporter. Closes #164 961 | 962 | 0.7.0 / 2011-12-18 963 | ================== 964 | 965 | * Added support for IE{7,8} [guille] 966 | * Changed: better browser nextTick implementation [guille] 967 | 968 | 0.6.0 / 2011-12-18 969 | ================== 970 | 971 | * Added setZeroTimeout timeout for browser (nicer stack traces). Closes #153 972 | * Added "view source" on hover for HTML reporter to make it obvious 973 | * Changed: replace custom growl with growl lib 974 | * Fixed duplicate reporting for HTML reporter. Closes #154 975 | * Fixed silent hook errors in the HTML reporter. Closes #150 976 | 977 | 0.5.0 / 2011-12-14 978 | ================== 979 | 980 | * Added: push node_modules directory onto module.paths for relative require Closes #93 981 | * Added teamcity reporter [blindsey] 982 | * Fixed: recover from uncaught exceptions for tests. Closes #94 983 | * Fixed: only emit "test end" for uncaught within test, not hook 984 | 985 | 0.4.0 / 2011-12-14 986 | ================== 987 | 988 | * Added support for test-specific timeouts via `this.timeout(0)`. Closes #134 989 | * Added guillermo's client-side EventEmitter. Closes #132 990 | * Added progress indicator to the HTML reporter 991 | * Fixed slow browser tests. Closes #135 992 | * Fixed "suite" color for light terminals 993 | * Fixed `require()` leak spotted by [guillermo] 994 | 995 | 0.3.6 / 2011-12-09 996 | ================== 997 | 998 | * Removed suite merging (for now) 999 | 1000 | 0.3.5 / 2011-12-08 1001 | ================== 1002 | 1003 | * Added support for `window.onerror` [guillermo] 1004 | * Fixed: clear timeout on uncaught exceptions. Closes #131 [guillermo] 1005 | * Added `mocha.css` to PHONY list. 1006 | * Added `mocha.js` to PHONY list. 1007 | 1008 | 0.3.4 / 2011-12-08 1009 | ================== 1010 | 1011 | * Added: allow `done()` to be called with non-Error 1012 | * Added: return Runner from `mocha.run()`. Closes #126 1013 | * Fixed: run afterEach even on failures. Closes #125 1014 | * Fixed clobbering of current runnable. Closes #121 1015 | 1016 | 0.3.3 / 2011-12-08 1017 | ================== 1018 | 1019 | * Fixed hook timeouts. Closes #120 1020 | * Fixed uncaught exceptions in hooks 1021 | 1022 | 0.3.2 / 2011-12-05 1023 | ================== 1024 | 1025 | * Fixed weird reporting when `err.message` is not present 1026 | 1027 | 0.3.1 / 2011-12-04 1028 | ================== 1029 | 1030 | * Fixed hook event emitter leak. Closes #117 1031 | * Fixed: export `Spec` constructor. Closes #116 1032 | 1033 | 0.3.0 / 2011-12-04 1034 | ================== 1035 | 1036 | * Added `-w, --watch`. Closes #72 1037 | * Added `--ignore-leaks` to ignore global leak checking 1038 | * Added browser `?grep=pattern` support 1039 | * Added `--globals ` to specify accepted globals. Closes #99 1040 | * Fixed `mocha-debug(1)` on some systems. Closes #232 1041 | * Fixed growl total, use `runner.total` 1042 | 1043 | 0.2.0 / 2011-11-30 1044 | ================== 1045 | 1046 | * Added `--globals ` to specify accepted globals. Closes #99 1047 | * Fixed funky highlighting of messages. Closes #97 1048 | * Fixed `mocha-debug(1)`. Closes #232 1049 | * Fixed growl total, use runner.total 1050 | 1051 | 0.1.0 / 2011-11-29 1052 | ================== 1053 | 1054 | * Added `suiteSetup` and `suiteTeardown` to TDD interface [David Henderson] 1055 | * Added growl icons. Closes #84 1056 | * Fixed coffee-script support 1057 | 1058 | 0.0.8 / 2011-11-25 1059 | ================== 1060 | 1061 | * Fixed: use `Runner#total` for accurate reporting 1062 | 1063 | 0.0.7 / 2011-11-25 1064 | ================== 1065 | 1066 | * Added `Hook` 1067 | * Added `Runnable` 1068 | * Changed: `Test` is `Runnable` 1069 | * Fixed global leak reporting in hooks 1070 | * Fixed: > 2 calls to done() only report the error once 1071 | * Fixed: clear timer on failure. Closes #80 1072 | 1073 | 0.0.6 / 2011-11-25 1074 | ================== 1075 | 1076 | * Fixed return on immediate async error. Closes #80 1077 | 1078 | 0.0.5 / 2011-11-24 1079 | ================== 1080 | 1081 | * Fixed: make mocha.opts whitespace less picky [kkaefer] 1082 | 1083 | 0.0.4 / 2011-11-24 1084 | ================== 1085 | 1086 | * Added `--interfaces` 1087 | * Added `--reporters` 1088 | * Added `-c, --colors`. Closes #69 1089 | * Fixed hook timeouts 1090 | 1091 | 0.0.3 / 2011-11-23 1092 | ================== 1093 | 1094 | * Added `-C, --no-colors` to explicitly disable 1095 | * Added coffee-script support 1096 | 1097 | 0.0.2 / 2011-11-22 1098 | ================== 1099 | 1100 | * Fixed global leak detection due to Safari bind() change 1101 | * Fixed: escape html entities in Doc reporter 1102 | * Fixed: escape html entities in HTML reporter 1103 | * Fixed pending test support for HTML reporter. Closes #66 1104 | 1105 | 0.0.1 / 2011-11-22 1106 | ================== 1107 | 1108 | * Added `--timeout` second shorthand support, ex `--timeout 3s`. 1109 | * Fixed "test end" event for uncaughtExceptions. Closes #61 1110 | 1111 | 0.0.1-alpha6 / 2011-11-19 1112 | ================== 1113 | 1114 | * Added travis CI support (needs enabling when public) 1115 | * Added preliminary browser support 1116 | * Added `make mocha.css` target. Closes #45 1117 | * Added stack trace to TAP errors. Closes #52 1118 | * Renamed tearDown to teardown. Closes #49 1119 | * Fixed: cascading hooksc. Closes #30 1120 | * Fixed some colors for non-tty 1121 | * Fixed errors thrown in sync test-cases due to nextTick 1122 | * Fixed Base.window.width... again give precedence to 0.6.x 1123 | 1124 | 0.0.1-alpha5 / 2011-11-17 1125 | ================== 1126 | 1127 | * Added `doc` reporter. Closes #33 1128 | * Added suite merging. Closes #28 1129 | * Added TextMate bundle and `make tm`. Closes #20 1130 | 1131 | 0.0.1-alpha4 / 2011-11-15 1132 | ================== 1133 | 1134 | * Fixed getWindowSize() for 0.4.x 1135 | 1136 | 0.0.1-alpha3 / 2011-11-15 1137 | ================== 1138 | 1139 | * Added `-s, --slow ` to specify "slow" test threshold 1140 | * Added `mocha-debug(1)` 1141 | * Added `mocha.opts` support. Closes #31 1142 | * Added: default [files] to _test/*.js_ 1143 | * Added protection against multiple calls to `done()`. Closes #35 1144 | * Changed: bright yellow for slow Dot reporter tests 1145 | 1146 | 0.0.1-alpha1 / 2011-11-08 1147 | ================== 1148 | 1149 | * Missed this one :) 1150 | 1151 | 0.0.1-alpha1 / 2011-11-08 1152 | ================== 1153 | 1154 | * Initial release 1155 | --------------------------------------------------------------------------------