✨feature: First push to git
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { escapeCell, sanitizeSheetName } from '../src/output/sheets.js';
|
||||
|
||||
describe('sheet output helpers', () => {
|
||||
it('sanitizes and truncates sheet names', () => {
|
||||
const name = sanitizeSheetName('Bad:/\\\\?*[] name '.repeat(12));
|
||||
|
||||
expect(name).not.toMatch(/[:/\\?*[\]]/);
|
||||
expect(name.length).toBeLessThanOrEqual(100);
|
||||
});
|
||||
|
||||
it('escapes formula-like cell values', () => {
|
||||
expect(escapeCell('=IMPORTXML("http://bad")')).toBe('\'=IMPORTXML("http://bad")');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user