build(aio): refactor dgeni packages
This is to tidy up the `author-packagse`, which currently duplicates a lot of the configuration in the main packages. We need to DRY this up so that we don't fall foul of a change in one being missed in the other.
This commit is contained in:

committed by
Pete Bacon Darwin

parent
7a8bd99ab1
commit
3cad5da5a4
@ -0,0 +1,28 @@
|
||||
const testPackage = require('../../helpers/test-package');
|
||||
const processorFactory = require('./markBarredODocsAsPrivate');
|
||||
const Dgeni = require('dgeni');
|
||||
|
||||
describe('generateApiListDoc processor', () => {
|
||||
|
||||
it('should be available on the injector', () => {
|
||||
const dgeni = new Dgeni([testPackage('angular-api-package')]);
|
||||
const injector = dgeni.configureInjector();
|
||||
const processor = injector.get('markBarredODocsAsPrivate');
|
||||
expect(processor.$process).toBeDefined();
|
||||
expect(processor.$runAfter).toContain('readTypeScriptModules');
|
||||
expect(processor.$runBefore).toContain('adding-extra-docs');
|
||||
});
|
||||
|
||||
it('should mark docs starting with barred-o ɵ as private', () => {
|
||||
const processor = processorFactory();
|
||||
const docs = [
|
||||
{ name: 'ɵPrivate' },
|
||||
{ name: 'public' }
|
||||
];
|
||||
processor.$process(docs);
|
||||
|
||||
expect(docs[0].privateExport).toBeTruthy();
|
||||
expect(docs[1].privateExport).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user