source: imaps-frontend/node_modules/object-inspect/test/quoteStyle.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: 933 bytes
RevLine 
[d565449]1'use strict';
2
3var inspect = require('../');
4var test = require('tape');
5
6test('quoteStyle option', function (t) {
7 t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value');
8 t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value');
9 t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value');
10 t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value');
11 t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value');
12 t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value');
13 t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value');
14 t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value');
15
16 t.end();
17});
Note: See TracBrowser for help on using the repository browser.