Enable unicorn/prefer-string-repeat rule (#19306)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
a5ba6d426e
commit
3149f353d7
7 files changed
+16
-15
No files matched your search
@@ -94,8 +94,10 @@ test("sharedUtil.getStringWidth", () => {
|
||||
|
||||
test("sharedUtil.getAlignmentSize", () => {
|
||||
const { getAlignmentSize } = utilities;
|
||||
expect(getAlignmentSize(" ")).toBe(3);
|
||||
expect(getAlignmentSize(" ", /* tabWidth */ 2, /* startIndex */ 2)).toBe(1);
|
||||
expect(getAlignmentSize(" ".repeat(3))).toBe(3);
|
||||
expect(
|
||||
getAlignmentSize(" ".repeat(3), /* tabWidth */ 2, /* startIndex */ 2),
|
||||
).toBe(1);
|
||||
expect(getAlignmentSize("\t\t", /* tabWidth */ 2)).toBe(4);
|
||||
expect(getAlignmentSize("\t\t", /* tabWidth */ 3)).toBe(6);
|
||||
expect(getAlignmentSize("\t\t", /* tabWidth */ 3, /* startIndex */ 1)).toBe(
|
||||
|
||||
Reference in new issue
Block a user