{"_id":"jasmine-where","_rev":"28-ba27894a28e101129a104e3405364561","name":"jasmine-where","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","dist-tags":{"latest":"0.0.12"},"versions":{"0.0.2":{"name":"jasmine-where","version":"0.0.2","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"~1.0.0","jasmine-intercept":"~0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.2","dist":{"shasum":"4fd5e1c104dc570af735956ce1cca90b8a3056c8","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.2.tgz","integrity":"sha512-eldlrjd9z52ioYqT4wD+IKHenSCvzdytuRJKngSITgTBM1BAJG8ZrPAqNM4nX4nO2d2637fiUDJllmGUKOWMjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsj1hH5qSIMWX7nbs318x6DnqYmpBysTmAu8DYpIJaAAiEAooWPk2/URStvOxxGgsccbLXD1u9ZKhqqSkGux0h6eV8="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.3":{"name":"jasmine-where","version":"0.0.3","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"~1.0.0","jasmine-intercept":"~0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.3","dist":{"shasum":"63073a969053818fe7195ff87f5d9f7bda795dd6","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.3.tgz","integrity":"sha512-KA7z8Gqn5405/14jrFMbSb4mUUZ4Nn5nEHg1gcwfvYBvJSlAUirpVaJz5VoSHLlrzC9it3M3TL0DCWgBlscqhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOpy4ABpfsfT0zOIyRQJA+LDJ0l5ht3+GqdlMxK/uQPAIhAI4sKJQO53u1WNJX8yAVdmK0xePpcpxnbe4ZM5n36HJc"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.4":{"name":"jasmine-where","version":"0.0.4","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"~1.0.0","jasmine-intercept":"~0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.4","dist":{"shasum":"c4103884bdc3ebc04e3e3f51808535767128b81c","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.4.tgz","integrity":"sha512-jZrey+J9SBOdwH3hklYzN48mC9lRZQBUuDAgF7i2LjDfPOL3FgINJy2tCgflHhjgwcW7Psx3E4nlM7lWecw2XA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEmGqFzx2Is8jNPT3GtBj8QmVozu99ylT9ME9C5cfxFlAiEAu7mbZ8sPTlXF7FiFogiqVgE+C7ioX1ZVP8Fob8pi/nI="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.5":{"name":"jasmine-where","version":"0.0.5","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"~1.0.0","jasmine-intercept":"~0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.5","dist":{"shasum":"3084ffc0a83d9c753d7ee6fba21abbf01d2c1eec","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.5.tgz","integrity":"sha512-mfnlPE76IRIeBtIgNzLULshCT/azsivE0bhIyHxQh3EzpBASCI7DXUt+qtLSINUus5RIbT6LzlnWD3EYxsAccA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRqgmB2rd5CpDEQwP1NJlbUowR+by7j3Zc+zQF6EbCvAiBEfWPl9ZW/bwH1ohWSgx1UMK6rZXPL3n5TPlKx2DKLSw=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.6":{"name":"jasmine-where","version":"0.0.6","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"~1.0.0","jasmine-intercept":"~0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.6","dist":{"shasum":"e88ccc2ad3b11c3ecdfc6bf0047f6e30b10eaa9e","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.6.tgz","integrity":"sha512-pgsZENLJNy+0YBkFggnpa6yuZf8EVTozz6XVYyJu8Ik8FH5rcsH5+WW89w21PlbPwEu07T5+XYVagOYprK3YNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUVIkM1Twbx6kmMui2B9FNq5MxZqfJzeXE2QWVzb/ysQIhAIQJN9MA+CWiU430CSRjHBh+glFhbTlGDGBCZvj6kz0O"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.7":{"name":"jasmine-where","version":"0.0.7","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"~1.0.0","jasmine-intercept":"~0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.7","dist":{"shasum":"4c9337b08086ac437d8b2a8f5e5540dcb3671731","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.7.tgz","integrity":"sha512-3mQYzalruWxstOQEkrev1wmsMu7sb/xRA1AUNGbaHqkgCE2hv66wsVfCGWK2P7qxtREF10jQB+JmNLsu9byiIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDB+ba+hOrdnYyH567YN/x/dGt0SbvLh9A6kLhBy6nPpAiAaS0l0KVwPbK9NFAdlrCgkpti6uEuRC1TSva/CzzfhHw=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.8":{"name":"jasmine-where","version":"0.0.8","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"1.x.x","jasmine-intercept":">= 0.0.2"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/node-suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.8","dist":{"shasum":"38372cf28d3a580725410e8b2d8d6bae2194cd63","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.8.tgz","integrity":"sha512-6i+qhTRE3o7lpyJjFl5o5wRTstflQwd0hzCWw7yNR2mAECOK5CEL9O+52+M14ll45fhySJBNgFmP/G6NIbAWFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGeWGCBxAJcOSLdL08kfzR9ZYdaSxjtWcjbk72VLkMnGAiEA/yJzHrVgOAlIuQSr2MSDvx2G12W8fUbVWAT+LBZsNlg="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.9":{"name":"jasmine-where","version":"0.0.9","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"1.x.x","jasmine-intercept":">= 0.0.9"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/node-suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.9","dist":{"shasum":"b31aaab943e205711b102c3fbd6bf362d40d749c","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.9.tgz","integrity":"sha512-XS1bxOF/UAvEK8kJxk6pymupt+PXXAOd+eo9jQ0ybIT/iA5thrT0Yh/MmGEaKOeIkmdkDn2H+/ZWutm/GiwvqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWG692u1URDUAachGlPOs6dwfBDat0ts2LD4YIqofcaAiEA8v3a3hHXj1wg2ECt3uEDgJtO0vlcHr+1h1PJRW9PbIU="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.10":{"name":"jasmine-where","version":"0.0.10","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"1.x.x","jasmine-intercept":">= 0.0.9"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/node-suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.10","dist":{"shasum":"8ec953f02bf35a5aa7f7188ff6dceeb5d665af20","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.10.tgz","integrity":"sha512-brzwNqt699udaphYQA9qTPA9W2cZjv8CKnUKc3pvEx7RF4e43rGH9eyVbwkgaBQ/ZRfVc38CxA7wNmoDpo5ylA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4zmlvmx7iq+qIrqGfFFRrah5XiePRcStxN5rFq9dESgIgOwG78oJcsrDMsZDp/v8go1qe8SwS/+WNsNqR6u5mcKw="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.11":{"name":"jasmine-where","version":"0.0.11","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"1.x.x"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/node-suite.spec.js"},"bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.11","dist":{"shasum":"b06c2b7f2d8955609a4f5efa785ea1a6d685250c","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.11.tgz","integrity":"sha512-j5EfW7dKnRsElZMJjGBCk5PkPdBE2Han3H60qYjy8/LYSNP7Icl3k8kJAmBOrF6QqJuUPRPvIWjDQI3RImiZAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIATda/DFsfYbju8L6EE6y/4xVlOf98d0EXX0q0NNGI4hAiEA5rNGdQup94VbdAuO3XidAXmUUKmXNwdLoBbf7EUMzHs="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"directories":{},"deprecated":"this package has been deprecated"},"0.0.12":{"name":"jasmine-where","version":"0.0.12","description":"provides where() clause to jasmine, similar to Cucumber scenario-outline examples or Spock where blocks","homepage":"https://github.com/dfkaye/jasmine-where","author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"devDependencies":{"jasmine-node":"1.x.x"},"license":"MIT","main":"./jasmine-where.js","repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"scripts":{"test":"jasmine-node --verbose ./test/node-suite.spec.js"},"gitHead":"96e9bda5bcba91420a2e4a20cb8c1fdc89586ba8","bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"_id":"jasmine-where@0.0.12","_shasum":"15e654e66f141f1a74ebf9f990187813b61ef955","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"dfkaye","email":"dfkaye@yahoo.com"},"maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"dist":{"shasum":"15e654e66f141f1a74ebf9f990187813b61ef955","tarball":"https://registry.npmjs.org/jasmine-where/-/jasmine-where-0.0.12.tgz","integrity":"sha512-CV8oj6QPxUEfp90EAbCzCzr0epOclfz5o0JPpmSpCzIJm558v6isC36zKasJb+NSZXX9LpXqepUAWwL+2MNt/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuipH5kNXKIPeVFgzJanLShRvA74h8QGkU/a0Wa3vIRQIhALadSiouY5WE9owzp5mjdub9i0rm3/yKANpnzoSGcv9y"}]},"directories":{},"deprecated":"this package has been deprecated"}},"readme":"# DEPRECATION NOTICE [7 JAN 2014]\r\n\r\n__jasmine-where has been superseded by [where.js](https://github.com/dfkaye/where.js)__\r\n\r\n[![Build Status](https://travis-ci.org/dfkaye/jasmine-where.png)](https://travis-ci.org/dfkaye/jasmine-where)\r\n\r\njasmine-where\r\n=============\r\n\r\nProvides a `where()` clause for data-table support to the \r\n[Jasmine BDD test framework](https://github.com/pivotal/jasmine), similar to \r\nCucumber's scenario-outline \r\n[Examples](https://github.com/cucumber/cucumber/wiki/Scenario-Outlines) \r\nor Spock's \r\n[where blocks](https://code.google.com/p/spock/wiki/SpockBasics#Where_Blocks).\r\n\r\nPartly inspired by:\r\n+ JP Castro's (@jphpsf)\r\n    [DRYing Up Your JavaScript Jasmine Tests With the Data Provider Pattern]\r\n    (http://blog.jphpsf.com/2012/08/30/drying-up-your-javascript-jasmine-tests)\r\n+ Richard Rodger's [mstring](https://github.com/rjrodger/mstring)\r\n\r\ninstall\r\n-------\r\n\r\n    npm install jasmine-where\r\n    \r\n    git clone https://github.com/dfkaye/jasmine-where.git\r\n  \r\nimportant\r\n---------\r\n\r\nIncluding or requiring `jasmine-where` adds a `where()` method to the **global** \r\nnamespace, for example:\r\n\r\n    require('jasmine-where');\r\n\r\n    where === global.where === jasmine.getEnv().where;\r\n\r\n    <script -- jasmine 1 or 2 scripts first -->\r\n    <script src=\"../jasmine-where.js\"></script>\r\n\r\n    where === window.where === jasmine.getEnv().where;\r\n    \r\njustify\r\n-------\r\n\r\nEasier to modify this\r\n    \r\n    it('description', function () {\r\n    \r\n      where(function(){/*** \r\n          a  |  b  |  c\r\n          1  |  2  |  2\r\n          4  |  3  |  4\r\n          6  |  6  |  6\r\n        ***/\r\n        \r\n        expect(a + b)).toBe(c);\r\n      });\r\n      \r\n    });\r\n\r\nthan this:\r\n\r\n    it('description', function () {\r\n    \r\n      [[1, 2, 2],\r\n       [4, 3, 4],\r\n       [6, 6, 6]].forEach(function(row, r, rows) {\r\n               \r\n        expect(Number(row[0]) + Number(row[1])).toBe(Number(row[2]));\r\n      });\r\n      \r\n    });\r\n    \r\nstory\r\n-----\r\n\r\nBorrowing from Richard Rodger's [mstring](https://github.com/rjrodger/mstring), \r\n`where()` accepts a function and inspects its string value, converts the triple-\r\ncommented data-table into an array of values, uses the labels as variables or \r\nsymbols in a new Function().\r\n\r\nEach `where()` clause works best with only one expectation clause at the moment \r\n(still debating whether it's worth supporting multiple expects in a single \r\n`where()`).\r\n\r\nformat\r\n------\r\n\r\nData tables must contain at least two rows, the first row containing symbols to \r\nbe used as variables in the expectation, whereas the remaining rows must contain \r\ndata for each symbol.\r\n\r\nFor example:\r\n\r\n    it('should pass with correct data and expectation', function () {\r\n      where(function(){/***\r\n         a | b | c\r\n         1 | 2 | 2\r\n         4 | 3 | 4\r\n         6 | 6 | 6\r\n        ***/\r\n        expect(Math.max(a, b)).toBe(c);\r\n      });\r\n    });\r\n\r\nTables may also contain left and right borders, similar to Cucumber and Fit:\r\n\r\n    it('should pass with left and right table borders', function () {\r\n      where(function(){/***\r\n        | a | b | c |\r\n        | 1 | 2 | 2 |\r\n        | 4 | 3 | 4 |\r\n        | 6 | 6 | 6 |\r\n        ***/\r\n        expect(Math.max(a, b)).toBe(c);\r\n      });\r\n    });\r\n\r\n    \r\nNumeric data is automatically coerced to Number type\r\n----------------------------------------------------\r\n\r\nSupports `Math.max(a, b)` to avoid re-typing `Math.max(Number(a), Number(b))`.\r\n\r\nEverything can use `toBe()` (strict equality) - no need to rely on `toMatch()`.\r\n\r\nHowever, where `Math` is involved there is usually an octal, signed, comma, or \r\nprecision bug waiting.  All but precision are handled automatically; however, \r\nyou can get precision into your tests by adding another column, as seen in the \r\ntest created to verify numeric conversions work:\r\n\r\n    where(function(){/***\r\n    \r\n            a     |    b     |    c     |  p\r\n            \r\n            0     |    1     |    1     |  1\r\n            0.0   |    1.0   |    1     |  1\r\n           -1     |   +1     |    0     |  1\r\n           +1.1   |   -1.2   |   -0.1   |  2\r\n           08     |   08     |   16     |  2\r\n            6     |    4     |   10.0   |  3\r\n            8.030 |   -2.045 |    5.985 |  4\r\n        1,000.67  | 1345     | 2345.67  |  6\r\n        \r\n      ***/\r\n      \r\n      // using precisions for famous 5.985 vs 5.98499999999999999999999999 bugz\r\n      var s = (a + b).toPrecision(p) // toPrecision() returns a string\r\n      expect(+s).toBe(c) // but prefixed '+' uses implicit conversion to number.\r\n    });\r\n\r\noutput\r\n------\r\n\r\nA passing `where()` clause has no effect on the usual jasmine output. \r\n\r\nWhen an expectation fails, the data-table labels plus the row of values for the \r\ncurrent expectation are added to the *current* failing item. Every failed \r\nexpectation in a `where()` clause will appear as:\r\n\r\n     [a | b | c] : \r\n     [1 | 2 | x] (Expected 2 to be 'x'.)\r\n\r\ninspect return values\r\n---------------------\r\n\r\nYou can capture the generated data table, including the labels, as the return \r\nvalue of the `where` clause for post-where assertions:\r\n\r\n    it('returns data', function () {\r\n      \r\n        var results = where(function(){/***\r\n        \r\n            a  |  b  |  c\r\n            1  |  1  |  1\r\n            1  |  2  |  two\r\n            3  |  2  |  3\r\n            5  |  3  |  5.01\r\n            \r\n          ***/\r\n          \r\n          // within where\r\n          expect(Math.max(a, b)).toBe(c);\r\n        });\r\n        \r\n        \r\n        // inspect results returned by where()\r\n        expect(results[2][2]).toBe('two');\r\n    });\r\n    \r\njasmine-intercept test dependency\r\n---------------------------------\r\n\r\nIn working this out, I found I needed a way to intercept the results in `where` \r\ntests that were *expected* to fail.  I've worked out \r\n[jasmine-intercept](https://github.com/dfkaye/jasmine-intercept) to handle that. \r\nIt is included in the node_modules directory of this repo (if you're viewing on \r\ngithub).\r\n\r\njasmine versions supported\r\n--------------------------\r\n\r\nCurrent implementation runs in both jasmine 1.3.1 and jasmine 2.0.0-rc3.\r\n\r\njasmine-node\r\n------------\r\n\r\nUsing [jasmine-node](https://github.com/mhevery/jasmine-node) which uses \r\n`jasmine-1.3.1` internally.  Run that with\r\n\r\n    jasmine-node --verbose ./test/node-suite.js\r\n\r\nor simply\r\n\r\n    npm test\r\n\r\nrawgit test page\r\n-------------------\r\n\r\n__The *jasmine2* browser test page is viewable on \r\n<a href='//rawgit.com/dfkaye/jasmine-where/master/test/browser-suite.html' \r\n   target='_new' title='opens in new tab or window'>rawgit</a>.__\r\n\r\ntestem\r\n------\r\n\r\nUsing Toby Ho's MAGNIFICENT [testemjs](https://github.com/airportyh/testem) to \r\ndrive tests in multiple browsers for jasmine-2.0.0 (see how to \r\n[hack testem for jasmine 2](https://github.com/dfkaye/testem-jasmine2)), as well \r\nas jasmine-node.  The `testem.json` file uses the standalone test page above, \r\nand also uses a custom launcher for jasmine-node (v 1.3.1).\r\n\r\nIn addition, the following command uses a custom launcher for `jasmine-node` in \r\n`testem`:\r\n\r\n    testem -l j\r\n","maintainers":[{"name":"dfkaye","email":"dfkaye@yahoo.com"}],"time":{"modified":"2022-06-19T03:48:51.062Z","created":"2013-10-31T21:15:40.089Z","0.0.2":"2013-10-31T21:15:42.694Z","0.0.3":"2013-10-31T21:24:19.950Z","0.0.4":"2013-11-14T18:51:09.459Z","0.0.5":"2013-11-14T18:53:34.444Z","0.0.6":"2013-11-14T21:08:52.775Z","0.0.7":"2013-11-15T20:28:54.465Z","0.0.8":"2013-12-10T06:48:08.661Z","0.0.9":"2014-01-07T19:11:30.752Z","0.0.10":"2014-01-16T20:17:25.170Z","0.0.11":"2014-02-07T22:16:34.460Z","0.0.12":"2014-10-09T19:42:54.265Z"},"author":{"name":"david kaye","email":"dfkaye@yahoo.com","url":"@dfkaye"},"repository":{"type":"git","url":"git://github.com/dfkaye/jasmine-where.git"},"readmeFilename":"README.md","homepage":"https://github.com/dfkaye/jasmine-where","bugs":{"url":"https://github.com/dfkaye/jasmine-where/issues"},"license":"MIT"}