summaryrefslogtreecommitdiff
path: root/skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-03-09 21:36:37 -0700
committerJesse Vincent <jesse@fsck.com>2026-03-09 21:36:37 -0700
commit7446c842d8754a9ce54dd82a9258443d08c490c3 (patch)
treee68400d83088f125ec6a7ed1a030bc749c90061f /skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js
parent5e2a89e985eb3c3f5ea2bccc2fa6f19ac5d26797 (diff)
Bundle brainstorm server dependencies instead of requiring npm install
Vendor node_modules into the repo so the brainstorm server works immediately on fresh plugin installs without needing npm at runtime.
Diffstat (limited to 'skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js')
-rw-r--r--skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js b/skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js
new file mode 100644
index 0000000..da23e63
--- /dev/null
+++ b/skills/brainstorming/scripts/node_modules/object-inspect/test/quoteStyle.js
@@ -0,0 +1,26 @@
+'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.equal(inspect('"', { quoteStyle: 'single' }), '\'"\'', 'double quote, quoteStyle: "single"');
+ t.equal(inspect('"', { quoteStyle: 'double' }), '"\\""', 'double quote, quoteStyle: "double"');
+
+ t.equal(inspect('\'', { quoteStyle: 'single' }), '\'\\\'\'', 'single quote, quoteStyle: "single"');
+ t.equal(inspect('\'', { quoteStyle: 'double' }), '"\'"', 'single quote, quoteStyle: "double"');
+
+ t.equal(inspect('`', { quoteStyle: 'single' }), '\'`\'', 'backtick, quoteStyle: "single"');
+ t.equal(inspect('`', { quoteStyle: 'double' }), '"`"', 'backtick, quoteStyle: "double"');
+
+ t.end();
+});