mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 07:20:39 +00:00
0152b900ef
* docs(parents) : reword . to the root document * docs(parents) : ensure .foo parents is well displayed and not transformed as with the single .
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import { formatCell } from '../utils.ts';
|
|
|
|
describe('tools/docs/test/utils', () => {
|
|
it('parents row header should be a td block', () => {
|
|
const parentsRowHeader = formatCell(
|
|
['parents', '.,package,test,ansible'],
|
|
0,
|
|
);
|
|
expect(parentsRowHeader).toEqual('<td>parents</td>');
|
|
});
|
|
|
|
it('parents content should be multiple code blocks, and . be display with "(the root document)"', () => {
|
|
const parents = formatCell(['parents', '.,packageRules,argocd,ansible'], 1);
|
|
expect(parents).toEqual(
|
|
'<td class="parents"><span><code>(the root document)</code></span><span><code>ansible</code></span><span><code>argocd</code></span><span><code>packageRules</code></span></td>',
|
|
);
|
|
});
|
|
|
|
it('parent named ".foo" should be not display with ".foo (the root document)"', () => {
|
|
const parents = formatCell(
|
|
['parents', '.foo,packageRules,argocd,ansible'],
|
|
1,
|
|
);
|
|
expect(parents).toEqual(
|
|
'<td class="parents"><span><code>.foo</code></span><span><code>ansible</code></span><span><code>argocd</code></span><span><code>packageRules</code></span></td>',
|
|
);
|
|
});
|
|
});
|