Urara-Blog/node_modules/.pnpm-store/v3/files/7b/750f4d0b8f90a594fed2ee98e436c549c4727c81f1a29650e729df54ff10e31214f17c9796efeb1a4a0d19564e57eabe394a6baac28c1db054d5f6f15032d1
2022-08-14 01:14:53 +08:00

17 lines
933 B
Text

'use strict';
var inspect = require('../');
var test = require('tape');
test('quoteStyle option', function (t) {
t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value');
t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value');
t.end();
});