source: imaps-frontend/node_modules/object-inspect/test/has.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 514 bytes
RevLine 
[d565449]1'use strict';
2
3var inspect = require('../');
4var test = require('tape');
5var mockProperty = require('mock-property');
6
7test('when Object#hasOwnProperty is deleted', function (t) {
8 t.plan(1);
9 var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays
10
11 t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty"
12 t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true }));
13
14 t.equal(inspect(arr), '[ 1, , 3 ]');
15});
Note: See TracBrowser for help on using the repository browser.