Fix and enable linting on tests
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
// tslint:disable:no-string-literal
|
||||
|
||||
import { expect } from "chai";
|
||||
import { Formatter } from "../../export/formatter";
|
||||
import { ContentTypes } from "./content-types";
|
||||
|
||||
describe("ContentTypes", () => {
|
||||
let contentTypes: ContentTypes;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "../../../../export/formatter";
|
||||
import { FooterReferenceType, PageBorderOffsetFrom, PageNumberFormat } from "./";
|
||||
import { SectionProperties } from "./section-properties";
|
||||
import { FooterReferenceType, PageNumberFormat, PageBorderOffsetFrom } from ".";
|
||||
|
||||
describe("SectionProperties", () => {
|
||||
describe("#constructor()", () => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { assert } from "chai";
|
||||
|
||||
import { SimplePos } from "./simple-pos";
|
||||
import { Utility } from "../../../tests/utility";
|
||||
import { SimplePos } from "./simple-pos";
|
||||
|
||||
describe("SimplePos", () => {
|
||||
describe("#constructor()", () => {
|
||||
|
@ -48,6 +48,7 @@ describe("External styles factory", () => {
|
||||
|
||||
describe("#parse", () => {
|
||||
it("should parse w:styles attributes", () => {
|
||||
// tslint:disable-next-line:no-any
|
||||
const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any;
|
||||
|
||||
expect(importedStyle.rootKey).to.equal("w:styles");
|
||||
@ -58,6 +59,7 @@ describe("External styles factory", () => {
|
||||
});
|
||||
|
||||
it("should parse other child elements of w:styles", () => {
|
||||
// tslint:disable-next-line:no-any
|
||||
const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any;
|
||||
|
||||
expect(importedStyle.root.length).to.equal(5);
|
||||
@ -134,6 +136,7 @@ describe("External styles factory", () => {
|
||||
});
|
||||
|
||||
it("should parse styles elements", () => {
|
||||
// tslint:disable-next-line:no-any
|
||||
const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any;
|
||||
|
||||
expect(importedStyle.root.length).to.equal(5);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { TableCellBorders, TableCellWidth, WidthType } from "./table-cell";
|
||||
import { Formatter } from "../../export/formatter";
|
||||
import { BorderStyle } from "../styles";
|
||||
import { TableCellBorders, TableCellWidth, WidthType } from "./table-cell";
|
||||
|
||||
describe("TableCellBorders", () => {
|
||||
describe("#prepForXml", () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { expect } from "chai";
|
||||
import { ImportedXmlComponent, convertToXmlComponent } from "./";
|
||||
import { convertToXmlComponent, ImportedXmlComponent } from "./";
|
||||
|
||||
const xmlString = `
|
||||
<w:p w:one="value 1" w:two="value 2">
|
||||
@ -15,6 +15,7 @@ const xmlString = `
|
||||
</w:p>
|
||||
`;
|
||||
|
||||
// tslint:disable:object-literal-key-quotes
|
||||
const importedXmlElement = {
|
||||
"w:p": {
|
||||
_attr: { "w:one": "value 1", "w:two": "value 2" },
|
||||
@ -22,6 +23,7 @@ const importedXmlElement = {
|
||||
"w:r": [{ _attr: { active: "true" }, "w:t": "Text 1" }, { _attr: { active: "true" }, "w:t": "Text 2" }],
|
||||
},
|
||||
};
|
||||
// tslint:enable:object-literal-key-quotes
|
||||
|
||||
const convertedXmlElement = {
|
||||
deleted: false,
|
||||
|
@ -21,7 +21,6 @@
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"tests",
|
||||
"**/*.spec.ts",
|
||||
"**/_*"
|
||||
],
|
||||
"typedocOptions": {
|
||||
|
Reference in New Issue
Block a user