Coding style fixes and improvements
This commit is contained in:
@ -116,7 +116,7 @@ try {
|
||||
for (let tag of [...new Set(Object.entries(tagDbData).map(t => t[1][0]))]
|
||||
.filter(v => v)
|
||||
.sort((a, b) => a.localeCompare(b))) {
|
||||
if (capitalize(tag, true) == 'Uncategorized') {
|
||||
if (capitalize(tag, true) === 'Uncategorized') {
|
||||
uncategorizedOutput +=
|
||||
`<h3>` +
|
||||
md
|
||||
|
||||
@ -12,7 +12,7 @@ test('Testing bindAll', (t) => {
|
||||
}
|
||||
};
|
||||
bindAll(view, 'click');
|
||||
t.equal(view.click(), 'clicked docs', 'Binds to an object context')
|
||||
t.equal(view.click(), 'clicked docs', 'Binds to an object context');
|
||||
//t.deepEqual(bindAll(args..), 'Expected');
|
||||
//t.equal(bindAll(args..), 'Expected');
|
||||
//t.false(bindAll(args..), 'Expected');
|
||||
|
||||
@ -15,8 +15,8 @@ test('Testing chunk', (t) => {
|
||||
t.throws(() => chunk(null), 'chunk(null) throws an error');
|
||||
|
||||
let start = new Date().getTime();
|
||||
chunk('This is a string', 2)
|
||||
chunk('This is a string', 2);
|
||||
let end = new Date().getTime();
|
||||
t.true((end - start) < 2000, 'chunk(This is a string, 2) takes less than 2s to run');
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
@ -9,7 +9,7 @@ test('Testing collectInto', (t) => {
|
||||
let p1 = Promise.resolve(1);
|
||||
let p2 = Promise.resolve(2);
|
||||
let p3 = new Promise(resolve => setTimeout(resolve, 2000, 3));
|
||||
Pall(p1, p2, p3).then(function(val){ t.deepEqual(val, [1,2,3], 'Works with multiple promises')}, function(reason){});
|
||||
Pall(p1, p2, p3).then(function(val){ t.deepEqual(val, [1,2,3], 'Works with multiple promises');}, function(reason){});
|
||||
//t.deepEqual(collectInto(args..), 'Expected');
|
||||
//t.equal(collectInto(args..), 'Expected');
|
||||
//t.false(collectInto(args..), 'Expected');
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
const isArrayBuffer = val => val instanceof ArrayBuffer;
|
||||
module.exports = isArrayBuffer
|
||||
module.exports = isArrayBuffer;
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
const isRegExp = val => val instanceof RegExp;
|
||||
module.exports = isRegExp
|
||||
module.exports = isRegExp;
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
const isSet = val => val instanceof Set;
|
||||
module.exports = isSet
|
||||
module.exports = isSet;
|
||||
|
||||
@ -15,7 +15,7 @@ test('Testing toKebabCase', (t) => {
|
||||
t.throws(() => toKebabCase(123), 'toKebabCase(123) throws an error');
|
||||
|
||||
let start = new Date().getTime();
|
||||
toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML')
|
||||
toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML');
|
||||
let end = new Date().getTime();
|
||||
t.true((end - start) < 2000, 'toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run');
|
||||
t.end();
|
||||
|
||||
Reference in New Issue
Block a user