Files
docx-js/src/file/paragraph/formatting/unordered-list.spec.ts

38 lines
1.0 KiB
TypeScript
Raw Normal View History

2019-06-27 01:35:58 +01:00
import { expect } from "chai";
2019-06-27 01:35:58 +01:00
import { Formatter } from "export/formatter";
2018-10-26 01:04:07 +01:00
import { NumberProperties } from "./unordered-list";
2016-07-17 16:28:54 +01:00
describe("NumberProperties", () => {
let numberProperties: NumberProperties;
beforeEach(() => {
numberProperties = new NumberProperties(5, 10);
2016-07-17 16:28:54 +01:00
});
describe("#constructor()", () => {
it("should create a Number Properties with correct root key", () => {
2019-06-27 01:35:58 +01:00
const tree = new Formatter().format(numberProperties);
expect(tree).to.deep.equal({
"w:numPr": [
{
"w:ilvl": {
_attr: {
"w:val": 10,
},
},
},
{
"w:numId": {
_attr: {
"w:val": 5,
},
},
},
],
});
2016-07-17 16:28:54 +01:00
});
});
2017-03-09 22:56:08 +00:00
});