mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
* Source-sorting by default Many changes * Uses a new version of module-deps that exposes a sort key we use to sort documentation. * Adds inference for methods in objects * Groups events into a separate comment property * Add jsdoc property. Refs https://github.com/documentationjs/documentation/pull/388#issuecomment-215791547 * Namespaces and paths * More powerful paths: paths now include name, kind, and scope * comments now include a 'namespace' property with a formatted namespace * Fix tests * Re-ignore fonts * Nix sourceKey from output * Pin dependency versions * Fix module-deps-sortable ref * Update tests for right deps
25 lines
581 B
JavaScript
25 lines
581 B
JavaScript
'use strict';
|
|
|
|
var test = require('tap').test,
|
|
sort = require('../../lib/sort');
|
|
|
|
test('sort stream alphanumeric', function (t) {
|
|
var apples = { context: { sortKey: 'a' }, name: 'apples' };
|
|
var carrot = { context: { sortKey: 'b' }, name: 'carrot' };
|
|
var banana = { context: { sortKey: 'c' }, name: 'bananas' };
|
|
|
|
t.deepEqual([
|
|
apples, carrot, banana
|
|
].sort(sort), [
|
|
apples, carrot, banana
|
|
], 'sort stream alphanumeric');
|
|
|
|
t.deepEqual([
|
|
carrot, apples, banana
|
|
].sort(sort), [
|
|
apples, carrot, banana
|
|
], 'sort stream alphanumeric');
|
|
|
|
t.end();
|
|
});
|