mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(docs-infra): refactor unit test
Replace two toContain assertions with a single toMatch using a multiline regex, per reviewer suggestion.
This commit is contained in:
committed by
Jessica Janiuk
parent
7febf40e0d
commit
bb1274d6ac
@@ -60,7 +60,6 @@ describe('markdown to html', () => {
|
||||
|
||||
it('should deindent inline code blocks correctly', () => {
|
||||
const codeBlock = markdownDocument.querySelectorAll('.docs-code')[6]?.querySelector('code');
|
||||
expect(codeBlock?.textContent).not.toContain(' // bar');
|
||||
expect(codeBlock?.textContent).toContain(' // bar');
|
||||
expect(codeBlock?.textContent).toMatch(/^ \/\/ bar/m);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user