refactor(compiler-dom): use String's built-in repeat method (#6700)

This commit is contained in:
被雨水过滤的空气-Rain 2023-11-10 14:39:19 +08:00 committed by GitHub
parent 3445356085
commit b71a889f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -20,10 +20,7 @@ describe('stringify static html', () => {
}
function repeat(code: string, n: number): string {
return new Array(n)
.fill(0)
.map(() => code)
.join('')
return code.repeat(n)
}
test('should bail on non-eligible static trees', () => {