Ignore:
Timestamp:
03/14/14 12:36:58 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Enable deployment with Grunt.

Location:
Dev/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11build
        2 quod-erat.git
  • Dev/trunk/node_modules/should/.idea/workspace.xml

    r484 r516  
    55      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/History.md" afterPath="$PROJECT_DIR$/History.md" />
    66      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
     7      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/should.js" afterPath="$PROJECT_DIR$/should.js" />
    78    </list>
    89    <ignored path="should.js.iws" />
     
    3940        <entry file="file://$PROJECT_DIR$/lib/should.js">
    4041          <provider selected="true" editor-type-id="text-editor">
    41             <state line="27" column="84" selection-start="644" selection-end="644" vertical-scroll-proportion="0.0" vertical-offset="1045" max-vertical-offset="19019">
     42            <state line="29" column="88" selection-start="656" selection-end="656" vertical-scroll-proportion="-8.796296" vertical-offset="0" max-vertical-offset="19057">
    4243              <folding />
    4344            </state>
     
    4849        <entry file="file://$PROJECT_DIR$/Readme.md">
    4950          <provider selected="true" editor-type-id="text-editor">
    50             <state line="419" column="0" selection-start="10358" selection-end="10358" vertical-scroll-proportion="0.0" vertical-offset="7961" max-vertical-offset="8702">
    51               <folding />
    52             </state>
    53           </provider>
    54         </entry>
    55       </file>
    56       <file leaf-file-name="package.json" pinned="false" current="true" current-in-tab="true">
     51            <state line="420" column="0" selection-start="10380" selection-end="10380" vertical-scroll-proportion="0.0" vertical-offset="7980" max-vertical-offset="8702">
     52              <folding />
     53            </state>
     54          </provider>
     55        </entry>
     56      </file>
     57      <file leaf-file-name="package.json" pinned="false" current="false" current-in-tab="false">
    5758        <entry file="file://$PROJECT_DIR$/package.json">
    5859          <provider selected="true" editor-type-id="text-editor">
    59             <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="0.0479798" vertical-offset="0" max-vertical-offset="792">
     60            <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="-1.52" vertical-offset="0" max-vertical-offset="399">
    6061              <folding />
    6162            </state>
     
    6667        <entry file="file://$PROJECT_DIR$/test/should.test.js">
    6768          <provider selected="true" editor-type-id="text-editor">
    68             <state line="913" column="62" selection-start="25161" selection-end="25161" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537">
     69            <state line="913" column="59" selection-start="25150" selection-end="25150" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537">
    6970              <folding>
    70                 <marker date="1384152632000" expanded="true" signature="24476:24735" placeholder="{...}" />
     71                <marker date="1386247488000" expanded="true" signature="24476:24735" placeholder="{...}" />
    7172              </folding>
    7273            </state>
     
    7475        </entry>
    7576      </file>
    76       <file leaf-file-name="History.md" pinned="false" current="false" current-in-tab="false">
     77      <file leaf-file-name="History.md" pinned="false" current="true" current-in-tab="true">
    7778        <entry file="file://$PROJECT_DIR$/History.md">
    7879          <provider selected="true" editor-type-id="text-editor">
    79             <state line="3" column="60" selection-start="99" selection-end="99" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3572">
     80            <state line="3" column="45" selection-start="84" selection-end="84" vertical-scroll-proportion="0.069767445" vertical-offset="0" max-vertical-offset="3667">
    8081              <folding />
    8182            </state>
     
    131132        <option value="$PROJECT_DIR$/lib/should.js" />
    132133        <option value="$PROJECT_DIR$/test/should.test.js" />
     134        <option value="$PROJECT_DIR$/package.json" />
    133135        <option value="$PROJECT_DIR$/History.md" />
    134         <option value="$PROJECT_DIR$/package.json" />
    135136      </list>
    136137    </option>
     
    201202            </PATH_ELEMENT>
    202203          </PATH>
     204          <PATH>
     205            <PATH_ELEMENT>
     206              <option name="myItemId" value="should.js" />
     207              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
     208            </PATH_ELEMENT>
     209            <PATH_ELEMENT>
     210              <option name="myItemId" value="should.js" />
     211              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     212            </PATH_ELEMENT>
     213            <PATH_ELEMENT>
     214              <option name="myItemId" value="lib" />
     215              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
     216            </PATH_ELEMENT>
     217          </PATH>
    203218        </subPane>
    204219      </pane>
     
    212227    <property name="FullScreen" value="false" />
    213228    <property name="DefaultHtmlFileTemplate" value="Html5" />
     229    <property name="options.splitter.details.proportions" value="0.2" />
    214230    <property name="options.searchVisible" value="true" />
    215     <property name="options.splitter.details.proportions" value="0.2" />
    216231  </component>
    217232  <component name="RunManager">
    218     <configuration default="true" type="DartUnitRunConfigurationType" factoryName="DartUnit">
    219       <option name="VMOptions" />
    220       <option name="arguments" />
    221       <option name="filePath" />
    222       <option name="scope" value="ALL" />
    223       <option name="testName" />
    224       <method />
    225     </configuration>
    226233    <configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
    227234      <option name="VMOptions" />
     
    232239      <option name="showConsoleOnStdErr" value="false" />
    233240      <option name="showConsoleOnStdOut" value="false" />
     241      <method />
     242    </configuration>
     243    <configuration default="true" type="DartUnitRunConfigurationType" factoryName="DartUnit">
     244      <option name="VMOptions" />
     245      <option name="arguments" />
     246      <option name="filePath" />
     247      <option name="scope" value="ALL" />
     248      <option name="testName" />
    234249      <method />
    235250    </configuration>
     
    354369    <entry file="file://$PROJECT_DIR$/Readme.md">
    355370      <provider selected="true" editor-type-id="text-editor">
    356         <state line="419" column="0" selection-start="10358" selection-end="10358" vertical-scroll-proportion="0.0" vertical-offset="7961" max-vertical-offset="8702">
     371        <state line="420" column="0" selection-start="10380" selection-end="10380" vertical-scroll-proportion="0.0" vertical-offset="7980" max-vertical-offset="8702">
    357372          <folding />
    358373        </state>
     
    368383    <entry file="file://$PROJECT_DIR$/.npmignore">
    369384      <provider selected="true" editor-type-id="text-editor">
    370         <state line="1" column="4" selection-start="13" selection-end="13" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="105">
    371           <folding />
     385        <state line="1" column="4" selection-start="13" selection-end="13" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="105" />
     386      </provider>
     387    </entry>
     388    <entry file="file://$PROJECT_DIR$/lib/should.js">
     389      <provider selected="true" editor-type-id="text-editor">
     390        <state line="29" column="88" selection-start="656" selection-end="656" vertical-scroll-proportion="-8.796296" vertical-offset="0" max-vertical-offset="19057">
     391          <folding />
     392        </state>
     393      </provider>
     394    </entry>
     395    <entry file="file://$PROJECT_DIR$/test/should.test.js">
     396      <provider selected="true" editor-type-id="text-editor">
     397        <state line="913" column="59" selection-start="25150" selection-end="25150" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537">
     398          <folding>
     399            <marker date="1386247488000" expanded="true" signature="24476:24735" placeholder="{...}" />
     400          </folding>
    372401        </state>
    373402      </provider>
     
    375404    <entry file="file://$PROJECT_DIR$/Makefile">
    376405      <provider selected="true" editor-type-id="text-editor">
    377         <state line="6" column="5" selection-start="64" selection-end="64" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="210">
    378           <folding />
    379         </state>
    380       </provider>
    381     </entry>
    382     <entry file="file://$PROJECT_DIR$/lib/should.js">
    383       <provider selected="true" editor-type-id="text-editor">
    384         <state line="27" column="84" selection-start="644" selection-end="644" vertical-scroll-proportion="0.0" vertical-offset="57" max-vertical-offset="19019">
    385           <folding />
    386         </state>
    387       </provider>
    388     </entry>
    389     <entry file="file://$PROJECT_DIR$/test/should.test.js">
    390       <provider selected="true" editor-type-id="text-editor">
    391         <state line="913" column="62" selection-start="25161" selection-end="25161" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537">
    392           <folding>
    393             <marker date="1384152632000" expanded="true" signature="24476:24735" placeholder="{...}" />
    394           </folding>
     406        <state line="6" column="5" selection-start="64" selection-end="64" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="266">
     407          <folding />
     408        </state>
     409      </provider>
     410    </entry>
     411    <entry file="file://$PROJECT_DIR$/package.json">
     412      <provider selected="true" editor-type-id="text-editor">
     413        <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="-1.52" vertical-offset="0" max-vertical-offset="399">
     414          <folding />
    395415        </state>
    396416      </provider>
     
    398418    <entry file="file://$PROJECT_DIR$/History.md">
    399419      <provider selected="true" editor-type-id="text-editor">
    400         <state line="3" column="60" selection-start="99" selection-end="99" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3572">
    401           <folding />
    402         </state>
    403       </provider>
    404     </entry>
    405     <entry file="file://$PROJECT_DIR$/package.json">
    406       <provider selected="true" editor-type-id="text-editor">
    407         <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="0.0479798" vertical-offset="0" max-vertical-offset="792">
     420        <state line="3" column="45" selection-start="84" selection-end="84" vertical-scroll-proportion="0.069767445" vertical-offset="0" max-vertical-offset="3667">
    408421          <folding />
    409422        </state>
  • Dev/trunk/node_modules/should/History.md

    r484 r516  
     12.1.1 / 2013-12-05
     2==================
     3
     4 * Move date formatting out of should.inspect
     5
    162.1.0 / 2013-11-11
    27==================
  • Dev/trunk/node_modules/should/Readme.md

    r484 r516  
    223223## property
    224224
    225 Assert property exists and has optional value:
     225Assert property exists and has optional value(compare using `===`):
    226226```javascript
    227227user.should.have.property('name')
  • Dev/trunk/node_modules/should/lib/should.js

    r484 r516  
    2525};
    2626
    27 should.inspect = function(obj, opts) {
    28   if(util.isDate(obj) && typeof obj.inspect !== 'function') obj = obj.toISOString();
    29   return inspect(obj, opts);
    30 };
     27should.inspect = inspect;
     28
     29function i(value) {
     30  if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates
     31  return should.inspect(value);
     32}
    3133
    3234/**
     
    5254  if(null == obj) {
    5355    throw new AssertionError({
    54       message: msg || ('expected ' + should.inspect(obj) + ' to exist')
     56      message: msg || ('expected ' + i(obj) + ' to exist')
    5557      , stackStartFunction: should.exist
    5658    });
     
    7072  if (null != obj) {
    7173    throw new AssertionError({
    72       message: msg || ('expected ' + should.inspect(obj) + ' to not exist')
     74      message: msg || ('expected ' + i(obj) + ' to not exist')
    7375      , stackStartFunction: should.not.exist
    7476    });
     
    238240
    239241  get inspect() {
    240     return should.inspect(this.obj);
     242    return i(this.obj);
    241243  },
    242244
     
    368370    this.assert(
    369371        eql(val, this.obj)
    370       , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }
    371       , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }
     372      , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") }
     373      , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") }
    372374      , val
    373375      , true
     
    387389    this.assert(
    388390        val === this.obj
    389       , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }
    390       , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }
     391      , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") }
     392      , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") }
    391393      , val
    392394      , void 0
     
    640642    if (this.negate && undefined !== val) {
    641643      if (undefined === this.obj[name]) {
    642         throw new Error(this.inspect + ' has no property ' + should.inspect(name) + (description ? " | " + description : ""));
     644        throw new Error(this.inspect + ' has no property ' + i(name) + (description ? " | " + description : ""));
    643645      }
    644646    } else {
    645647      this.assert(
    646648          undefined !== this.obj[name]
    647         , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name) + (description ? " | " + description : "") }
    648         , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + (description ? " | " + description : "") }
     649        , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) + (description ? " | " + description : "") }
     650        , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + (description ? " | " + description : "") }
    649651        , void 0
    650652        , void 0
     
    655657      this.assert(
    656658          val === this.obj[name]
    657         , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name)
    658           + ' of ' + should.inspect(val) + ', but got ' + should.inspect(this.obj[name]) + (description ? " | " + description : "") }
    659         , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + ' of ' + should.inspect(val) + (description ? " | " + description : "") }
     659        , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name)
     660          + ' of ' + i(val) + ', but got ' + i(this.obj[name]) + (description ? " | " + description : "") }
     661        , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + ' of ' + i(val) + (description ? " | " + description : "") }
    660662        , void 0
    661663        , void 0
     
    691693    if (len > 1) {
    692694      names = names.map(function(name){
    693         return should.inspect(name);
     695        return i(name);
    694696      });
    695697      var last = names.pop();
    696698      str = names.join(', ') + ', and ' + last;
    697699    } else {
    698       str = should.inspect(names[0]);
     700      str = i(names[0]);
    699701    }
    700702
     
    721723    this.assert(
    722724      hasOwnProperty.call(this.obj, name)
    723       , function(){ return 'expected ' + this.inspect + ' to have own property ' + should.inspect(name) + (description ? " | " + description : "") }
    724       , function(){ return 'expected ' + this.inspect + ' to not have own property ' + should.inspect(name) + (description ? " | " + description : "") }
     725      , function(){ return 'expected ' + this.inspect + ' to have own property ' + i(name) + (description ? " | " + description : "") }
     726      , function(){ return 'expected ' + this.inspect + ' to not have own property ' + i(name) + (description ? " | " + description : "") }
    725727      , void 0
    726728      , void 0
     
    739741  startWith: function(str, description) {
    740742    this.assert(0 === this.obj.indexOf(str)
    741     , function() { return 'expected ' + this.inspect + ' to start with ' + should.inspect(str) + (description ? " | " + description : "") }
    742     , function() { return 'expected ' + this.inspect + ' to not start with ' + should.inspect(str) + (description ? " | " + description : "") }
     743    , function() { return 'expected ' + this.inspect + ' to start with ' + i(str) + (description ? " | " + description : "") }
     744    , function() { return 'expected ' + this.inspect + ' to not start with ' + i(str) + (description ? " | " + description : "") }
    743745    , void 0
    744746    , void 0
     
    756758  endWith: function(str, description) {
    757759    this.assert(-1 !== this.obj.indexOf(str, this.obj.length - str.length)
    758     , function() { return 'expected ' + this.inspect + ' to end with ' + should.inspect(str) + (description ? " | " + description : "") }
    759     , function() { return 'expected ' + this.inspect + ' to not end with ' + should.inspect(str) + (description ? " | " + description : "") }
     760    , function() { return 'expected ' + this.inspect + ' to end with ' + i(str) + (description ? " | " + description : "") }
     761    , function() { return 'expected ' + this.inspect + ' to not end with ' + i(str) + (description ? " | " + description : "") }
    760762    , void 0
    761763    , void 0
     
    778780      this.assert(
    779781          eql(cmp, obj)
    780         , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
    781         , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
     782        , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") }
     783        , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") }
    782784        , void 0
    783785        , void 0
     
    786788      this.assert(
    787789          ~this.obj.indexOf(obj)
    788         , function(){ return 'expected ' + this.inspect + ' to include ' + should.inspect(obj) + (description ? " | " + description : "") }
    789         , function(){ return 'expected ' + this.inspect + ' to not include ' + should.inspect(obj) + (description ? " | " + description : "") }
     790        , function(){ return 'expected ' + this.inspect + ' to include ' + i(obj) + (description ? " | " + description : "") }
     791        , function(){ return 'expected ' + this.inspect + ' to not include ' + i(obj) + (description ? " | " + description : "") }
    790792        , void 0
    791793        , void 0
     
    806808    this.assert(
    807809      this.obj.some(function(item) { return eql(obj, item); })
    808       , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
    809       , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
     810      , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") }
     811      , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") }
    810812      , void 0
    811813      , void 0
     
    846848    if (len > 1) {
    847849      keys = keys.map(function(key){
    848         return should.inspect(key);
     850        return i(key);
    849851      });
    850852      var last = keys.pop();
    851853      str = keys.join(', ') + ', and ' + last;
    852854    } else {
    853       str = should.inspect(keys[0]);
     855      str = i(keys[0]);
    854856    }
    855857
     
    895897    this.assert(
    896898        code == status
    897       , function(){ return 'expected response code of ' + code + ' ' + should.inspect(statusCodes[code])
    898         + ', but got ' + status + ' ' + should.inspect(statusCodes[status]) }
    899       , function(){ return 'expected to not respond with ' + code + ' ' + should.inspect(statusCodes[code]) });
     899      , function(){ return 'expected response code of ' + code + ' ' + i(statusCodes[code])
     900        + ', but got ' + status + ' ' + i(statusCodes[status]) }
     901      , function(){ return 'expected to not respond with ' + code + ' ' + i(statusCodes[code]) });
    900902
    901903    return this;
  • Dev/trunk/node_modules/should/package.json

    r484 r516  
    22  "name": "should",
    33  "description": "test framework agnostic BDD-style assertions",
    4   "version": "2.1.0",
     4  "version": "2.1.1",
    55  "author": {
    66    "name": "TJ Holowaychuk",
     
    3333    "node": ">= 0.2.0"
    3434  },
    35   "readme": "# should.js\n\n_should_ is an expressive, readable, test framework agnostic, assertion library for [node](http://nodejs.org).\n\nIt extends the Object prototype with a single non-enumerable getter that allows you to express how that object should behave.\n\n## Example\n```javascript\nvar should = require('should');\n\nvar user = {\n    name: 'tj'\n  , pets: ['tobi', 'loki', 'jane', 'bandit']\n};\n\nuser.should.have.property('name', 'tj');\nuser.should.have.property('pets').with.lengthOf(4);\n\n// or without Object.prototype, for guys how did Object.create(null)\nshould(user).have.property('name', 'tj');\nshould(true).ok;\n\nsomeAsyncTask(foo, function(err, result){\n  should.not.exist(err);\n  should.exist(result);\n  result.bar.should.equal(foo);\n});\n```\n## Installation\n\n    $ npm install should --save-dev\n\n## In browser\n\nIf you want to use _should_ in browser, use version that is in root of repository. It is build with browserify (see [Makefile](https://github.com/visionmedia/should.js/blob/master/Makefile) about how it is build). To build fresh version:\n\n```bash\n# you should have browserify\nnpm install -g browserify\nmake browser\n```\n\n## chaining assertions\n\nEvery assertion will return a should.js-wraped Object, so assertions can be chained. For example:\n\n```js\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj');\nuser.pets.should.be.instanceof(Array).and.have.lengthOf(4);\n```\n\nAll assertions return themselves but not `property` and `ownProperty`. They two would return the property value.\n\nfor example if a property is volatile we can first assert property existence:\n```javascript\n// `user.should.have.property('pets')` returned `should(user.pets)` but not `should(user)`\nuser.should.have.property('pets').with.lengthOf(4)\n```\nwhich is essentially equivalent to below, however the property may not exist:\n```javascript\nuser.pets.should.have.lengthOf(4)\n```\n\nour dummy getters such as _a_, _an_, _be_, _of_ and _have_ make tests more readable while the getters _and_ and _with_ helps express chaining:\n```javascript\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj')\nuser.should.have.property('pets').with.a.lengthOf(4)\n```\nThose getters don't have any actual effect, just for readability.\n\n## static\n\nFor some rare cases should can be used statically, without `Object.prototype`.\nIt can be replacement for node assert module (and it uses the same `AssertionError`):\n\n```javascript\nassert.fail(actual, expected, message, operator) // just write wrong should assertion\nassert(value, message), assert.ok(value, [message]) // should(value).ok\nassert.equal(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message])\nassert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message])\nassert.throws(block, [error], [message]) // should(block).throw([error])\nassert.doesNotThrow(block, [message]) // should(block).not.throw([error])\nassert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy)\n```\n\n## ok\n\nAssert truthfulness:\n```javascript\ntrue.should.be.ok\n'yay'.should.be.ok\n(1).should.be.ok\n```\nor negated:\n```javascript\nfalse.should.not.be.ok\n''.should.not.be.ok\n(0).should.not.be.ok\n```\n## true\n\nAssert === true:\n```javascript\ntrue.should.be.true\n'1'.should.not.be.true\n```\n## false\n\nAssert === false:\n```javascript\nfalse.should.be.false\n(0).should.not.be.false\n```\n## arguments\n\nAssert `Arguments`:\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n## empty\n\nAsserts that given object is empty\n```javascript\n[].should.be.empty\n''.should.be.empty\n({}).should.be.empty\n(function() {\n  arguments.should.be.empty;\n})()\n```\n## eql\n\nequality:\n```javascript\n({ foo: 'bar' }).should.eql({ foo: 'bar' })\n[1,2,3].should.eql([1,2,3])\n```\n## equal and exactly\n\nstrict equality:\n```javascript\nshould.strictEqual(undefined, value)\nshould.strictEqual(false, value)\n(4).should.equal(4)\n'test'.should.equal('test')\n[1,2,3].should.not.equal([1,2,3])\n(4).should.be.exactly(4)\n```\n## within\n\nAssert inclusive numeric range:\n```javascript\nuser.age.should.be.within(5, 50)\n```\n## approximately\n\nAssert floating point number:\n```javascript\n(99.99).should.be.approximately(100, 0.1);\n```\n## type\n\nAssert __typeof__:\n```javascript\nuser.should.be.type('object')\n'test'.should.be.type('string')\n```\n## instanceof and instanceOf\n\nAssert __instanceof__ or __instanceOf__:\n```javascript\nuser.should.be.an.instanceof(User)\n[].should.be.an.instanceOf(Array)\n```\n## above\n\nAssert numeric value above the given value:\n```javascript\nuser.age.should.be.above(5)\nuser.age.should.not.be.above(100)\n```\n## below\n\nAssert numeric value below the given value:\n```javascript\nuser.age.should.be.below(100)\nuser.age.should.not.be.below(5)\n```\n## NaN\n\nAssert numeric valus is NaN:\n```javascript\n(undefined + 0).should.be.NaN;\n```\n## Infinity\n\nAssert numeric valus is Infinity:\n```javascript\n(1/0).should.be.Infinity;\n```\n## match\n\nAssert regexp match:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n## length\n\nAssert _length_ property exists and has a value of the given number:\n```javascript\nuser.pets.should.have.length(5)\nuser.pets.should.have.a.lengthOf(5)\n({ length: 10}).should.have.length(10);\n```\nAliases: _lengthOf_\n\n## property\n\nAssert property exists and has optional value:\n```javascript\nuser.should.have.property('name')\nuser.should.have.property('age', 15)\nuser.should.not.have.property('rawr')\nuser.should.not.have.property('age', 0)\n```\n\n## properties\n\nAssert given properties exists:\n```javascript\nuser.should.have.properties('name', 'age');\nuser.should.have.properties(['name', 'age']);\n```\n## ownProperty\n\nAssert own property (on the immediate object):\n```javascript\n({ foo: 'bar' }).should.have.ownProperty('foo')\n```\n## status(code)\n\n Asserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n## header(field[, value])\n\n Asserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header('content-length');\nres.should.have.header('Content-Length', '123');\nres.should.have.header('content-length', '123');\n```\n## json\n\n  Assert that Content-Type is \"application/json; charset=utf-8\"\n```javascript\nres.should.be.json\n```\n## html\n\n  Assert that Content-Type is \"text/html; charset=utf-8\"\n```javascript\nres.should.be.html\n```\n\n## include(obj) or contain(obj)\n\nAssert that the given `obj` is present via `indexOf()`, so this works for strings, arrays, or custom objects implementing indexOf. Also it can assert if given object will have some sub-object.\n\nAssert array value:\n```javascript\n[1,2,3].should.include(3)\n[1,2,3].should.include(2)\n[1,2,3].should.not.include(4)\n```\nAssert substring:\n```javascript\n'foo bar baz'.should.include('foo')\n'foo bar baz'.should.include('bar')\n'foo bar baz'.should.include('baz')\n'foo bar baz'.should.not.include('FOO')\n```\nAssert object includes another object:\n```javascript\nvar tobi = { name: 'Tobi', age: 1 };\nvar jane = { name: 'Jane', age: 5 };\nvar user = { name: 'TJ', pet: tobi };\n\nuser.should.include({ pet: tobi });\nuser.should.include({ pet: tobi, name: 'TJ' });\nuser.should.not.include({ pet: jane });\nuser.should.not.include({ name: 'Someone' });\n```\n## includeEql(obj)\n\nAssert that an object equal to the given `obj` is present in an Array:\n```javascript\n[[1],[2],[3]].should.includeEql([3])\n[[1],[2],[3]].should.includeEql([2])\n[[1],[2],[3]].should.not.includeEql([4])\n```\n## throw()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n  throw new Error('fail');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exception message matches string:\n\n```js\n(function(){\n  throw new Error('fail');\n}).should.throw('fail');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n  throw new Error('failed to foo');\n}).should.throw(/^fail/);\n```\n\n## throwError()\n\nAn alias of `throw`, its purpose is to be an option for those who run\n[jshint](https://github.com/jshint/node-jshint/) in strict mode.\n\n```js\n(function(){\n  throw new Error('failed to baz');\n}).should.throwError(/^fail.*/);\n```\n\n## startWith(str)\n\nAssert that string starts with `str`.\n\n```javascript\n'foobar'.should.startWith('foo')\n'foobar'.should.not.startWith('bar')\n```\n## endWith(str)\n\nAssert that string ends with `str`.\n\n```javascript\n'foobar'.should.endWith('bar')\n'foobar'.should.not.endWith('foo')\n```\n\n## keys\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n    var obj = { foo: 'bar', baz: 'raz' };\n    obj.should.have.keys('foo', 'baz');\n    obj.should.have.keys(['foo', 'baz']);\n\n## type assertions\n\n```javascript\n({}).should.be.an.Object;\n(1).should.be.an.Number;\n[].should.be.an.Array;\n(true).should.be.a.Boolean;\n''.should.be.a.String;\n```\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n    (1).should.eql(0, 'some useful description')\n\n    AssertionError: expected 1 to equal 0 | some useful description\n      at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n      ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `a`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`, `include`, and `includeEql`.\n\n## Mocha example\n\nFor example you can use should with the [Mocha test framework](http://visionmedia.github.io/mocha/) by simply including it:\n\n```javascript\nvar should = require('should');\nvar mylib = require('mylib');\n\n\ndescribe('mylib', function () {\n  it('should have a version with the format #.#.#', function() {\n    lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n  }\n});\n```\n\n## Running tests\n\nTo run the tests for _should_ simply run:\n\n    $ make test\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nCopyright (c) 2011 Aseem Kishore &lt;aseem.kishore@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
     35  "readme": "# should.js\n\n_should_ is an expressive, readable, test framework agnostic, assertion library for [node](http://nodejs.org).\n\nIt extends the Object prototype with a single non-enumerable getter that allows you to express how that object should behave.\n\n## Example\n```javascript\nvar should = require('should');\n\nvar user = {\n    name: 'tj'\n  , pets: ['tobi', 'loki', 'jane', 'bandit']\n};\n\nuser.should.have.property('name', 'tj');\nuser.should.have.property('pets').with.lengthOf(4);\n\n// or without Object.prototype, for guys how did Object.create(null)\nshould(user).have.property('name', 'tj');\nshould(true).ok;\n\nsomeAsyncTask(foo, function(err, result){\n  should.not.exist(err);\n  should.exist(result);\n  result.bar.should.equal(foo);\n});\n```\n## Installation\n\n    $ npm install should --save-dev\n\n## In browser\n\nIf you want to use _should_ in browser, use version that is in root of repository. It is build with browserify (see [Makefile](https://github.com/visionmedia/should.js/blob/master/Makefile) about how it is build). To build fresh version:\n\n```bash\n# you should have browserify\nnpm install -g browserify\nmake browser\n```\n\n## chaining assertions\n\nEvery assertion will return a should.js-wraped Object, so assertions can be chained. For example:\n\n```js\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj');\nuser.pets.should.be.instanceof(Array).and.have.lengthOf(4);\n```\n\nAll assertions return themselves but not `property` and `ownProperty`. They two would return the property value.\n\nfor example if a property is volatile we can first assert property existence:\n```javascript\n// `user.should.have.property('pets')` returned `should(user.pets)` but not `should(user)`\nuser.should.have.property('pets').with.lengthOf(4)\n```\nwhich is essentially equivalent to below, however the property may not exist:\n```javascript\nuser.pets.should.have.lengthOf(4)\n```\n\nour dummy getters such as _a_, _an_, _be_, _of_ and _have_ make tests more readable while the getters _and_ and _with_ helps express chaining:\n```javascript\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj')\nuser.should.have.property('pets').with.a.lengthOf(4)\n```\nThose getters don't have any actual effect, just for readability.\n\n## static\n\nFor some rare cases should can be used statically, without `Object.prototype`.\nIt can be replacement for node assert module (and it uses the same `AssertionError`):\n\n```javascript\nassert.fail(actual, expected, message, operator) // just write wrong should assertion\nassert(value, message), assert.ok(value, [message]) // should(value).ok\nassert.equal(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message])\nassert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message])\nassert.throws(block, [error], [message]) // should(block).throw([error])\nassert.doesNotThrow(block, [message]) // should(block).not.throw([error])\nassert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy)\n```\n\n## ok\n\nAssert truthfulness:\n```javascript\ntrue.should.be.ok\n'yay'.should.be.ok\n(1).should.be.ok\n```\nor negated:\n```javascript\nfalse.should.not.be.ok\n''.should.not.be.ok\n(0).should.not.be.ok\n```\n## true\n\nAssert === true:\n```javascript\ntrue.should.be.true\n'1'.should.not.be.true\n```\n## false\n\nAssert === false:\n```javascript\nfalse.should.be.false\n(0).should.not.be.false\n```\n## arguments\n\nAssert `Arguments`:\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n## empty\n\nAsserts that given object is empty\n```javascript\n[].should.be.empty\n''.should.be.empty\n({}).should.be.empty\n(function() {\n  arguments.should.be.empty;\n})()\n```\n## eql\n\nequality:\n```javascript\n({ foo: 'bar' }).should.eql({ foo: 'bar' })\n[1,2,3].should.eql([1,2,3])\n```\n## equal and exactly\n\nstrict equality:\n```javascript\nshould.strictEqual(undefined, value)\nshould.strictEqual(false, value)\n(4).should.equal(4)\n'test'.should.equal('test')\n[1,2,3].should.not.equal([1,2,3])\n(4).should.be.exactly(4)\n```\n## within\n\nAssert inclusive numeric range:\n```javascript\nuser.age.should.be.within(5, 50)\n```\n## approximately\n\nAssert floating point number:\n```javascript\n(99.99).should.be.approximately(100, 0.1);\n```\n## type\n\nAssert __typeof__:\n```javascript\nuser.should.be.type('object')\n'test'.should.be.type('string')\n```\n## instanceof and instanceOf\n\nAssert __instanceof__ or __instanceOf__:\n```javascript\nuser.should.be.an.instanceof(User)\n[].should.be.an.instanceOf(Array)\n```\n## above\n\nAssert numeric value above the given value:\n```javascript\nuser.age.should.be.above(5)\nuser.age.should.not.be.above(100)\n```\n## below\n\nAssert numeric value below the given value:\n```javascript\nuser.age.should.be.below(100)\nuser.age.should.not.be.below(5)\n```\n## NaN\n\nAssert numeric valus is NaN:\n```javascript\n(undefined + 0).should.be.NaN;\n```\n## Infinity\n\nAssert numeric valus is Infinity:\n```javascript\n(1/0).should.be.Infinity;\n```\n## match\n\nAssert regexp match:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n## length\n\nAssert _length_ property exists and has a value of the given number:\n```javascript\nuser.pets.should.have.length(5)\nuser.pets.should.have.a.lengthOf(5)\n({ length: 10}).should.have.length(10);\n```\nAliases: _lengthOf_\n\n## property\n\nAssert property exists and has optional value(compare using `===`):\n```javascript\nuser.should.have.property('name')\nuser.should.have.property('age', 15)\nuser.should.not.have.property('rawr')\nuser.should.not.have.property('age', 0)\n```\n\n## properties\n\nAssert given properties exists:\n```javascript\nuser.should.have.properties('name', 'age');\nuser.should.have.properties(['name', 'age']);\n```\n## ownProperty\n\nAssert own property (on the immediate object):\n```javascript\n({ foo: 'bar' }).should.have.ownProperty('foo')\n```\n## status(code)\n\n Asserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n## header(field[, value])\n\n Asserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header('content-length');\nres.should.have.header('Content-Length', '123');\nres.should.have.header('content-length', '123');\n```\n## json\n\n  Assert that Content-Type is \"application/json; charset=utf-8\"\n```javascript\nres.should.be.json\n```\n## html\n\n  Assert that Content-Type is \"text/html; charset=utf-8\"\n```javascript\nres.should.be.html\n```\n\n## include(obj) or contain(obj)\n\nAssert that the given `obj` is present via `indexOf()`, so this works for strings, arrays, or custom objects implementing indexOf. Also it can assert if given object will have some sub-object.\n\nAssert array value:\n```javascript\n[1,2,3].should.include(3)\n[1,2,3].should.include(2)\n[1,2,3].should.not.include(4)\n```\nAssert substring:\n```javascript\n'foo bar baz'.should.include('foo')\n'foo bar baz'.should.include('bar')\n'foo bar baz'.should.include('baz')\n'foo bar baz'.should.not.include('FOO')\n```\nAssert object includes another object:\n```javascript\nvar tobi = { name: 'Tobi', age: 1 };\nvar jane = { name: 'Jane', age: 5 };\nvar user = { name: 'TJ', pet: tobi };\n\nuser.should.include({ pet: tobi });\nuser.should.include({ pet: tobi, name: 'TJ' });\nuser.should.not.include({ pet: jane });\nuser.should.not.include({ name: 'Someone' });\n```\n## includeEql(obj)\n\nAssert that an object equal to the given `obj` is present in an Array:\n```javascript\n[[1],[2],[3]].should.includeEql([3])\n[[1],[2],[3]].should.includeEql([2])\n[[1],[2],[3]].should.not.includeEql([4])\n```\n## throw()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n  throw new Error('fail');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exception message matches string:\n\n```js\n(function(){\n  throw new Error('fail');\n}).should.throw('fail');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n  throw new Error('failed to foo');\n}).should.throw(/^fail/);\n```\n\n## throwError()\n\nAn alias of `throw`, its purpose is to be an option for those who run\n[jshint](https://github.com/jshint/node-jshint/) in strict mode.\n\n```js\n(function(){\n  throw new Error('failed to baz');\n}).should.throwError(/^fail.*/);\n```\n\n## startWith(str)\n\nAssert that string starts with `str`.\n\n```javascript\n'foobar'.should.startWith('foo')\n'foobar'.should.not.startWith('bar')\n```\n## endWith(str)\n\nAssert that string ends with `str`.\n\n```javascript\n'foobar'.should.endWith('bar')\n'foobar'.should.not.endWith('foo')\n```\n\n## keys\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n    var obj = { foo: 'bar', baz: 'raz' };\n    obj.should.have.keys('foo', 'baz');\n    obj.should.have.keys(['foo', 'baz']);\n\n## type assertions\n\n```javascript\n({}).should.be.an.Object;\n(1).should.be.an.Number;\n[].should.be.an.Array;\n(true).should.be.a.Boolean;\n''.should.be.a.String;\n```\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n    (1).should.eql(0, 'some useful description')\n\n    AssertionError: expected 1 to equal 0 | some useful description\n      at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n      ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `a`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`, `include`, and `includeEql`.\n\n## Mocha example\n\nFor example you can use should with the [Mocha test framework](http://visionmedia.github.io/mocha/) by simply including it:\n\n```javascript\nvar should = require('should');\nvar mylib = require('mylib');\n\n\ndescribe('mylib', function () {\n  it('should have a version with the format #.#.#', function() {\n    lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n  }\n});\n```\n\n## Running tests\n\nTo run the tests for _should_ simply run:\n\n    $ make test\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nCopyright (c) 2011 Aseem Kishore &lt;aseem.kishore@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
    3636  "readmeFilename": "Readme.md",
    3737  "bugs": {
    3838    "url": "https://github.com/visionmedia/should.js/issues"
    3939  },
    40   "_id": "should@2.1.0",
     40  "_id": "should@2.1.1",
    4141  "dist": {
    42     "shasum": "7bceb94366f4e87672f3ced74cc9f1561f234336"
     42    "shasum": "4a86e19fe38285785031d253938daedb169f72e5"
    4343  },
    44   "_from": "should@",
    45   "_resolved": "https://registry.npmjs.org/should/-/should-2.1.0.tgz"
     44  "_from": "should@2.1.1",
     45  "_resolved": "https://registry.npmjs.org/should/-/should-2.1.1.tgz"
    4646}
  • Dev/trunk/node_modules/should/should.js

    r484 r516  
    189189};
    190190
    191 should.inspect = function(obj, opts) {
    192   if(util.isDate(obj) && typeof obj.inspect !== 'function') obj = obj.toISOString();
    193   return inspect(obj, opts);
    194 };
     191should.inspect = inspect;
     192
     193function i(value) {
     194  if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates
     195  return should.inspect(value);
     196}
    195197
    196198/**
     
    216218  if(null == obj) {
    217219    throw new AssertionError({
    218       message: msg || ('expected ' + should.inspect(obj) + ' to exist')
     220      message: msg || ('expected ' + i(obj) + ' to exist')
    219221      , stackStartFunction: should.exist
    220222    });
     
    234236  if (null != obj) {
    235237    throw new AssertionError({
    236       message: msg || ('expected ' + should.inspect(obj) + ' to not exist')
     238      message: msg || ('expected ' + i(obj) + ' to not exist')
    237239      , stackStartFunction: should.not.exist
    238240    });
     
    402404
    403405  get inspect() {
    404     return should.inspect(this.obj);
     406    return i(this.obj);
    405407  },
    406408
     
    532534    this.assert(
    533535        eql(val, this.obj)
    534       , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }
    535       , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }
     536      , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") }
     537      , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") }
    536538      , val
    537539      , true
     
    551553    this.assert(
    552554        val === this.obj
    553       , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }
    554       , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }
     555      , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") }
     556      , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") }
    555557      , val
    556558      , void 0
     
    804806    if (this.negate && undefined !== val) {
    805807      if (undefined === this.obj[name]) {
    806         throw new Error(this.inspect + ' has no property ' + should.inspect(name) + (description ? " | " + description : ""));
     808        throw new Error(this.inspect + ' has no property ' + i(name) + (description ? " | " + description : ""));
    807809      }
    808810    } else {
    809811      this.assert(
    810812          undefined !== this.obj[name]
    811         , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name) + (description ? " | " + description : "") }
    812         , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + (description ? " | " + description : "") }
     813        , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) + (description ? " | " + description : "") }
     814        , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + (description ? " | " + description : "") }
    813815        , void 0
    814816        , void 0
     
    819821      this.assert(
    820822          val === this.obj[name]
    821         , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name)
    822           + ' of ' + should.inspect(val) + ', but got ' + should.inspect(this.obj[name]) + (description ? " | " + description : "") }
    823         , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + ' of ' + should.inspect(val) + (description ? " | " + description : "") }
     823        , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name)
     824          + ' of ' + i(val) + ', but got ' + i(this.obj[name]) + (description ? " | " + description : "") }
     825        , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + ' of ' + i(val) + (description ? " | " + description : "") }
    824826        , void 0
    825827        , void 0
     
    855857    if (len > 1) {
    856858      names = names.map(function(name){
    857         return should.inspect(name);
     859        return i(name);
    858860      });
    859861      var last = names.pop();
    860862      str = names.join(', ') + ', and ' + last;
    861863    } else {
    862       str = should.inspect(names[0]);
     864      str = i(names[0]);
    863865    }
    864866
     
    885887    this.assert(
    886888      hasOwnProperty.call(this.obj, name)
    887       , function(){ return 'expected ' + this.inspect + ' to have own property ' + should.inspect(name) + (description ? " | " + description : "") }
    888       , function(){ return 'expected ' + this.inspect + ' to not have own property ' + should.inspect(name) + (description ? " | " + description : "") }
     889      , function(){ return 'expected ' + this.inspect + ' to have own property ' + i(name) + (description ? " | " + description : "") }
     890      , function(){ return 'expected ' + this.inspect + ' to not have own property ' + i(name) + (description ? " | " + description : "") }
    889891      , void 0
    890892      , void 0
     
    903905  startWith: function(str, description) {
    904906    this.assert(0 === this.obj.indexOf(str)
    905     , function() { return 'expected ' + this.inspect + ' to start with ' + should.inspect(str) + (description ? " | " + description : "") }
    906     , function() { return 'expected ' + this.inspect + ' to not start with ' + should.inspect(str) + (description ? " | " + description : "") }
     907    , function() { return 'expected ' + this.inspect + ' to start with ' + i(str) + (description ? " | " + description : "") }
     908    , function() { return 'expected ' + this.inspect + ' to not start with ' + i(str) + (description ? " | " + description : "") }
    907909    , void 0
    908910    , void 0
     
    920922  endWith: function(str, description) {
    921923    this.assert(-1 !== this.obj.indexOf(str, this.obj.length - str.length)
    922     , function() { return 'expected ' + this.inspect + ' to end with ' + should.inspect(str) + (description ? " | " + description : "") }
    923     , function() { return 'expected ' + this.inspect + ' to not end with ' + should.inspect(str) + (description ? " | " + description : "") }
     924    , function() { return 'expected ' + this.inspect + ' to end with ' + i(str) + (description ? " | " + description : "") }
     925    , function() { return 'expected ' + this.inspect + ' to not end with ' + i(str) + (description ? " | " + description : "") }
    924926    , void 0
    925927    , void 0
     
    942944      this.assert(
    943945          eql(cmp, obj)
    944         , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
    945         , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
     946        , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") }
     947        , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") }
    946948        , void 0
    947949        , void 0
     
    950952      this.assert(
    951953          ~this.obj.indexOf(obj)
    952         , function(){ return 'expected ' + this.inspect + ' to include ' + should.inspect(obj) + (description ? " | " + description : "") }
    953         , function(){ return 'expected ' + this.inspect + ' to not include ' + should.inspect(obj) + (description ? " | " + description : "") }
     954        , function(){ return 'expected ' + this.inspect + ' to include ' + i(obj) + (description ? " | " + description : "") }
     955        , function(){ return 'expected ' + this.inspect + ' to not include ' + i(obj) + (description ? " | " + description : "") }
    954956        , void 0
    955957        , void 0
     
    970972    this.assert(
    971973      this.obj.some(function(item) { return eql(obj, item); })
    972       , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
    973       , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }
     974      , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") }
     975      , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") }
    974976      , void 0
    975977      , void 0
     
    10101012    if (len > 1) {
    10111013      keys = keys.map(function(key){
    1012         return should.inspect(key);
     1014        return i(key);
    10131015      });
    10141016      var last = keys.pop();
    10151017      str = keys.join(', ') + ', and ' + last;
    10161018    } else {
    1017       str = should.inspect(keys[0]);
     1019      str = i(keys[0]);
    10181020    }
    10191021
     
    10591061    this.assert(
    10601062        code == status
    1061       , function(){ return 'expected response code of ' + code + ' ' + should.inspect(statusCodes[code])
    1062         + ', but got ' + status + ' ' + should.inspect(statusCodes[status]) }
    1063       , function(){ return 'expected to not respond with ' + code + ' ' + should.inspect(statusCodes[code]) });
     1063      , function(){ return 'expected response code of ' + code + ' ' + i(statusCodes[code])
     1064        + ', but got ' + status + ' ' + i(statusCodes[status]) }
     1065      , function(){ return 'expected to not respond with ' + code + ' ' + i(statusCodes[code]) });
    10641066
    10651067    return this;
Note: See TracChangeset for help on using the changeset viewer.