返回 oh-my-ppt
pptx-geometry-package.test.ts
根目录 / tests / unit / io / pptx-geometry-package.test.ts
1 import { describe, expect, it } from 'vitest'
2 import {
3 getSvgPathBounds,
4 renderOoxmlPresetShapePath
5 } from '@arcsin1/pptx-ooxml-geometry'
6
7 describe('PPTX geometry package integration', () => {
8 it('resolves the shared OOXML geometry dependency used by the importer', () => {
9 expect(getSvgPathBounds('M 10 20 h 30 v 40 z')).toEqual({
10 minX: 10,
11 minY: 20,
12 width: 30,
13 height: 40
14 })
15 expect(renderOoxmlPresetShapePath('hexagon', 120, 80)).toContain('L 120 40')
16 })
17 })
18
18 lines TYPESCRIPT