parent
a29ce57732
commit
6b6fdffc12
|
@ -38,10 +38,6 @@ module.exports = function(config) {
|
||||||
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
||||||
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
||||||
|
|
||||||
// tslib (TS helper fns such as `__extends`)
|
|
||||||
{ pattern: 'node_modules/tslib/**/*.js', included: false, watched: false },
|
|
||||||
{ pattern: 'node_modules/tslib/**/*.js.map', included: false, watched: false },
|
|
||||||
|
|
||||||
// Paths loaded via module imports:
|
// Paths loaded via module imports:
|
||||||
// Angular itself
|
// Angular itself
|
||||||
{ pattern: 'node_modules/@angular/**/*.js', included: false, watched: false },
|
{ pattern: 'node_modules/@angular/**/*.js', included: false, watched: false },
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,10 +17,17 @@ describe('angular-api-package: computeApiBreadCrumbs processor', () => {
|
||||||
const API_DOC_TYPES_TO_RENDER = ['class', 'interface', 'package'];
|
const API_DOC_TYPES_TO_RENDER = ['class', 'interface', 'package'];
|
||||||
const processor = processorFactory(API_DOC_TYPES_TO_RENDER);
|
const processor = processorFactory(API_DOC_TYPES_TO_RENDER);
|
||||||
|
|
||||||
|
const corePackage = { docType: 'package', name: '@angular/core', id: 'core', path: 'core', isPrimaryPackage: true };
|
||||||
|
const coreTestingPackage = { docType: 'package', name: '@angular/core/testing', id: 'core/testing', path: 'core/testing', packageInfo: { primary: corePackage } };
|
||||||
|
const testRequestClass = { docType: 'class', name: 'InjectSetupWrapper', path: 'core/testing/test_bed', moduleDoc: coreTestingPackage };
|
||||||
|
|
||||||
const docs = [
|
const docs = [
|
||||||
{ docType: 'class', name: 'ClassA', path: 'module-1/class-a', moduleDoc: { id: 'moduleOne', path: 'module-1' } },
|
{ docType: 'class', name: 'ClassA', path: 'module-1/class-a', moduleDoc: { id: 'moduleOne', path: 'module-1' } },
|
||||||
{ docType: 'interface', name: 'InterfaceB', path: 'module-2/interface-b', moduleDoc: { id: 'moduleTwo', path: 'module-2' } },
|
{ docType: 'interface', name: 'InterfaceB', path: 'module-2/interface-b', moduleDoc: { id: 'moduleTwo', path: 'module-2' } },
|
||||||
{ docType: 'guide', name: 'Guide One', path: 'guide/guide-1' },
|
{ docType: 'guide', name: 'Guide One', path: 'guide/guide-1' },
|
||||||
|
corePackage,
|
||||||
|
coreTestingPackage,
|
||||||
|
testRequestClass
|
||||||
];
|
];
|
||||||
processor.$process(docs);
|
processor.$process(docs);
|
||||||
|
|
||||||
|
@ -35,5 +42,20 @@ describe('angular-api-package: computeApiBreadCrumbs processor', () => {
|
||||||
{ text: 'InterfaceB', path: 'module-2/interface-b' },
|
{ text: 'InterfaceB', path: 'module-2/interface-b' },
|
||||||
]);
|
]);
|
||||||
expect(docs[2].breadCrumbs).toBeUndefined();
|
expect(docs[2].breadCrumbs).toBeUndefined();
|
||||||
|
expect(docs[3].breadCrumbs).toEqual([
|
||||||
|
{ text: 'API', path: '/api' },
|
||||||
|
{ text: '@angular/core', path: 'core' },
|
||||||
|
]);
|
||||||
|
expect(docs[4].breadCrumbs).toEqual([
|
||||||
|
{ text: 'API', path: '/api' },
|
||||||
|
{ text: '@angular/core', path: 'core' },
|
||||||
|
{ text: '@angular/core/testing', path: 'core/testing' },
|
||||||
|
]);
|
||||||
|
expect(docs[5].breadCrumbs).toEqual([
|
||||||
|
{ text: 'API', path: '/api' },
|
||||||
|
{ text: '@angular/core', path: 'core' },
|
||||||
|
{ text: '@angular/core/testing', path: 'core/testing' },
|
||||||
|
{ text: 'InjectSetupWrapper', path: 'core/testing/test_bed' },
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue