odfjs/tests/sheetRawContentToObjects.js
David Bruant 5a539f333d
expose odt text function (#1)
* Remove xlsx support

* Restructure exports to avoid duplication of DOM-related code

* browser DOM exports

* Fixing exports field in package.json
2025-04-17 17:39:08 +02:00

39 lines
778 B
JavaScript

import test from 'ava';
import { sheetRawContentToObjects } from "../exports.js"
test("Empty header value should be kept", t => {
const rawContent = [
[
{
type: "string",
value: "",
},
{
type: "string",
value: "Pitchou",
},
],
[
{
type: "string",
value: "1",
},
{
type: "string",
value: "2",
},
]
]
const object = sheetRawContentToObjects(rawContent)
t.deepEqual(
object,
[
{
"Column 1": "1",
"Pitchou": "2",
}
]
)
})