source: imaps-frontend/node_modules/object-inspect/test/fakes.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: 683 bytes
RevLine 
[d565449]1'use strict';
2
3var inspect = require('../');
4var test = require('tape');
5var hasToStringTag = require('has-tostringtag/shams')();
6var forEach = require('for-each');
7
8test('fakes', { skip: !hasToStringTag }, function (t) {
9 forEach([
10 'Array',
11 'Boolean',
12 'Date',
13 'Error',
14 'Number',
15 'RegExp',
16 'String'
17 ], function (expected) {
18 var faker = {};
19 faker[Symbol.toStringTag] = expected;
20
21 t.equal(
22 inspect(faker),
23 '{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }',
24 'faker masquerading as ' + expected + ' is not shown as one'
25 );
26 });
27
28 t.end();
29});
Note: See TracBrowser for help on using the repository browser.