Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ describe('Picture', () => {
createTextNode: (text: string) => ({ text }),
};
const origCreateElement = Util.createElement;
Util.createElement = (doc: any, name: string, attrs?: any) => doc.createElement(name);
Util.createElement = (doc: any, name: string, _attrs?: any) => doc.createElement(name);
const pic = new Picture();
pic.anchor = { toXML: (doc: any, node: any) => ({ nodeName: 'anchored', children: [node] }) } as any;
pic.anchor = { toXML: (_doc: any, node: any) => ({ nodeName: 'anchored', children: [node] }) } as any;
pic.setMedia({ fileName: 'img.png', rId: 'rId1', id: '4', data: '', contentType: 'image/png', extension: 'png' });
pic.setDescription('desc');
const xml = pic.toXML(xmlDoc as any);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('Workbook', () => {
// Mock window.XMLSerializer
(globalThis as any).window = {
XMLSerializer: class {
serializeToString(val: any) {
serializeToString(_val: any) {
return '<mocked/>';
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ vi.mock('../Util.js', async () => {
},
createXmlDoc: vi.fn(() => ({
documentElement: makeMockNode(),
createElement: vi.fn((doc, name) => makeMockNode(name)),
createElement: vi.fn((_doc, name) => makeMockNode(name)),
createTextNode: vi.fn(() => ({})),
})),
createElement: vi.fn((doc, name) => makeMockNode(name)),
createElement: vi.fn((_doc, name) => makeMockNode(name)),
positionToLetterRef: vi.fn((col, row) => `${col}${row}`),
setAttributesOnDoc: vi.fn(() => {}),
uniqueId: vi.fn(prefix => `${prefix}-1`),
Expand Down Expand Up @@ -198,8 +198,6 @@ describe('Excel/Worksheet', () => {
ws._orientation = 'landscape';
(globalThis as any).__currentWorksheet = ws;
ws.toXML();
// Check that Util.createElement was called with pageSetup and orientation
const calls = (globalThis as any).__colSetAttributeCalls;
// Since our Util mock doesn't track pageSetup, let's spy on Util.createElement
// Instead, check that the orientation is set on a node
// (the Util mock will be called with name 'pageSetup' and orientation)
Expand Down