Refactor: improve fileEqual impl
Some checks are pending
Build / Build (push) Waiting to run
Build / Diff output (push) Blocked by required conditions
Build / Deploy to Cloudflare Pages (push) Blocked by required conditions
Build / Deploy to GitHub and GitLab (push) Blocked by required conditions

This commit is contained in:
SukkaW
2025-03-06 00:01:15 +08:00
parent 5f96fd024e
commit e13cee4e46
2 changed files with 34 additions and 51 deletions

View File

@@ -39,6 +39,12 @@ describe('fileEqual', () => {
false
));
it('comment less', () => test(
['# A', '# B', 'B'],
['# A', 'B'],
false
));
it('larger', () => test(
['A', 'B'],
['A', 'B', 'C'],
@@ -51,9 +57,15 @@ describe('fileEqual', () => {
false
));
it('eol', () => test(
it('eol more', () => test(
['A', 'B'],
['A', 'B', ''],
true
false
));
it('eol less', () => test(
['A', 'B', ''],
['A', 'B'],
false
));
});