sync: update from private repo (2336949a)
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
oss-sync
2026-09-17 11:29:31 +00:00
parent 28f74c4e37
commit 57702b4f34
2139 changed files with 321270 additions and 17494 deletions
+31
View File
@@ -0,0 +1,31 @@
import { describe, expect, it } from 'vitest';
import { normalizePatchOperations, parseExcelPatchInput } from './excel-patch.js';
describe('Excel patch edge cases', () => {
it('supports a valid sheet name containing an exclamation mark', () => {
const parsed = parseExcelPatchInput({
output_path: 'output/book.xlsx',
operations: [
{ op: 'add_sheet', name: 'Ops!' },
{ op: 'set_values', sheet: 'Ops!', range: 'A1', values: },
],
});
if (!parsed.ok) throw new Error(parsed.violations.map((item) => item.message).join('; '));
const normalized = normalizePatchOperations(parsed.value, { sheets: [], formulaCells: 0 });
expect(normalized).toMatchObject({ ok: true });
});
it.each([Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY])(
'rejects non-finite cell value %s',
(value) => {
expect(parseExcelPatchInput({
output_path: 'output/book.xlsx',
operations: [
{ op: 'set_values', sheet: 'Sheet1', range: 'A1', values: },
],
})).toMatchObject({ ok: false });
},
);
});