Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/docxml/src/utilities/tests.ts

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
import * as docxml from "https://deno.land/x/docxml@5.3.0/src/utilities/tests.ts";

Functions

Get a Archive instance for a given file. The file name is absolute from the project directory.

Get the instance of XmlFile that correlates with an XML file in a DOCX archive. The archive location is absolute from the project directory. The file location is absolute from the ZIP root.

Get the text contents of a file in a ZIP archive. The archive location is absolute from the project directory. The file location is absolute from the ZIP root.

Get the DOM of an XML file in a ZIP archive. The archive location is absolute from the project directory. The file location is absolute from the ZIP root.

Creates a small test suite to assert that an object can succesfully be parsed from XML, serialized to XML again and then parses a 2nd time to the same object as before.

Convenient but unoptimized function to run an XPath test against the DOM of a file in the DOCX archive that has a specific relationship (such as being the "main document" or the "settings").