Fix and enable linting on tests

This commit is contained in:
Dolan
2018-08-09 23:29:40 +01:00
parent 89df3c48e0
commit 5f594a822f
7 changed files with 14 additions and 7 deletions

View File

@ -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;

View File

@ -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()", () => {

View File

@ -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()", () => {

View File

@ -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);

View File

@ -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", () => {

View File

@ -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,

View File

@ -21,7 +21,6 @@
"exclude": [
"node_modules",
"tests",
"**/*.spec.ts",
"**/_*"
],
"typedocOptions": {