build(aio): don't constrain `checkContentRules` to run before another processor (#24000)
We don't really care when this processor runs as long as it happens after the tags have been extracted. By not constraining its `runBefore` property we can ensure that other processors can be run before it. PR Close #24000
This commit is contained in:
parent
131d0d8e8a
commit
293ec78069
|
@ -32,7 +32,7 @@ module.exports = function checkContentRules(log, createDocMessage) {
|
||||||
docTypeRules: {},
|
docTypeRules: {},
|
||||||
failOnContentErrors: false,
|
failOnContentErrors: false,
|
||||||
$runAfter: ['tags-extracted'],
|
$runAfter: ['tags-extracted'],
|
||||||
$runBefore: ['processing-docs'],
|
$runBefore: [],
|
||||||
$process(docs) {
|
$process(docs) {
|
||||||
const logMessage = this.failOnContentErrors ? log.error.bind(log) : log.warn.bind(log);
|
const logMessage = this.failOnContentErrors ? log.error.bind(log) : log.warn.bind(log);
|
||||||
const errors = [];
|
const errors = [];
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('checkContentRules processor', function() {
|
||||||
|
|
||||||
it('shpuld run at the right time', () => {
|
it('shpuld run at the right time', () => {
|
||||||
expect(processor.$runAfter).toEqual(['tags-extracted']);
|
expect(processor.$runAfter).toEqual(['tags-extracted']);
|
||||||
expect(processor.$runBefore).toEqual(['processing-docs']);
|
expect(processor.$runBefore).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should do nothing if not configured', () => {
|
it('should do nothing if not configured', () => {
|
||||||
|
|
Loading…
Reference in New Issue