huge clean up of project. Now uses @types, and removed committed typings.
Formatted the imports too
This commit is contained in:
@ -1,7 +1,4 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
|
||||
import {assert} from "chai";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
@ -11,7 +8,7 @@ function jsonify(obj: Object) {
|
||||
describe("", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
|
||||
});
|
||||
|
||||
describe("#methodName()", () => {
|
||||
|
@ -1,12 +1,10 @@
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
import {Body} from "../../../docx/document/body";
|
||||
import {assert} from "chai";
|
||||
import {SectionProperties} from "../../../docx/document/body/section-properties";
|
||||
import {PageSize} from "../../../docx/document/body/page-size";
|
||||
import {PageMargin} from "../../../docx/document/body/page-margin";
|
||||
import {Columns} from "../../../docx/document/body/columns";
|
||||
import {DocumentGrid} from "../../../docx/document/body/doc-grid";
|
||||
import { Body } from "../../../docx/document/body";
|
||||
import { assert } from "chai";
|
||||
import { SectionProperties } from "../../../docx/document/body/section-properties";
|
||||
import { PageSize } from "../../../docx/document/body/page-size";
|
||||
import { PageMargin } from "../../../docx/document/body/page-margin";
|
||||
import { Columns } from "../../../docx/document/body/columns";
|
||||
import { DocumentGrid } from "../../../docx/document/body/doc-grid";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,8 +1,5 @@
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import * as docx from "../../../docx";
|
||||
import {assert} from "chai";
|
||||
import { assert } from "chai";
|
||||
|
||||
describe("Document", () => {
|
||||
let document: docx.Document;
|
||||
|
@ -1,8 +1,5 @@
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {ThematicBreak} from "../../../docx/paragraph/border";
|
||||
import {assert} from "chai";
|
||||
import { ThematicBreak } from "../../../docx/paragraph/border";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {PageBreak} from "../../../docx/paragraph/page-break";
|
||||
import {assert} from "chai";
|
||||
import { PageBreak } from "../../../docx/paragraph/page-break";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
@ -26,7 +26,7 @@ describe("PageBreak", () => {
|
||||
let newJson = jsonify(pageBreak);
|
||||
assert.equal(newJson.rootKey, "w:r");
|
||||
});
|
||||
|
||||
|
||||
it("should create a Page Break with a Break inside", () => {
|
||||
let newJson = jsonify(pageBreak);
|
||||
assert.equal(newJson.root[1].rootKey, "w:br");
|
||||
|
@ -1,8 +1,5 @@
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Style} from "../../../docx/paragraph/style";
|
||||
import {assert} from "chai";
|
||||
import { Style } from "../../../docx/paragraph/style";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,8 +1,5 @@
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import * as docx from "../../../docx";
|
||||
import {assert} from "chai";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {LeftTabStop, MaxRightTabStop} from "../../../docx/paragraph/tab-stop";
|
||||
import {assert} from "chai";
|
||||
import { LeftTabStop, MaxRightTabStop } from "../../../docx/paragraph/tab-stop";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {NumberProperties} from "../../../docx/paragraph/unordered-list";
|
||||
import {assert} from "chai";
|
||||
import { NumberProperties } from "../../../docx/paragraph/unordered-list";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Break} from "../../../docx/run/break";
|
||||
import {assert} from "chai";
|
||||
import { Break } from "../../../docx/run/break";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Run} from "../../../docx/run";
|
||||
import {TextRun} from "../../../docx/run/text-run";
|
||||
import {assert} from "chai";
|
||||
import { Run } from "../../../docx/run";
|
||||
import { TextRun } from "../../../docx/run/text-run";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {SubScript, SuperScript} from "../../../docx/run/script";
|
||||
import {assert} from "chai";
|
||||
import { SubScript, SuperScript } from "../../../docx/run/script";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Strike, DoubleStrike} from "../../../docx/run/strike";
|
||||
import {assert} from "chai";
|
||||
import { Strike, DoubleStrike } from "../../../docx/run/strike";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Tab} from "../../../docx/run/tab";
|
||||
import {assert} from "chai";
|
||||
import { Tab } from "../../../docx/run/tab";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {TextRun} from "../../../docx/run/text-run";
|
||||
import {assert} from "chai";
|
||||
import { TextRun } from "../../../docx/run/text-run";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as u from "../../../docx/run/underline";
|
||||
import {TextRun} from "../../../docx/run/text-run";
|
||||
import {assert} from "chai";
|
||||
import { TextRun } from "../../../docx/run/text-run";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Attributes} from "../../../docx/xml-components";
|
||||
import {assert} from "chai";
|
||||
import { Attributes } from "../../../docx/xml-components";
|
||||
import { assert } from "chai";
|
||||
|
||||
describe("Attribute", () => {
|
||||
let attributes: Attributes;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {XmlComponent} from "../../../docx/xml-components";
|
||||
import {assert} from "chai";
|
||||
import { XmlComponent } from "../../../docx/xml-components";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {XmlUnitComponent} from "../../../docx/xml-components";
|
||||
import {assert} from "chai";
|
||||
import { XmlUnitComponent } from "../../../docx/xml-components";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,12 +1,8 @@
|
||||
/// <reference path="../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../typings/lodash/lodash.d.ts" />
|
||||
/// <reference path="../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Formatter} from "../../export/formatter";
|
||||
import { Formatter } from "../../export/formatter";
|
||||
import * as docx from "../../docx";
|
||||
import {Attributes} from "../../docx/xml-components";
|
||||
import {Properties} from "../../properties";
|
||||
import {assert} from "chai";
|
||||
import { Attributes } from "../../docx/xml-components";
|
||||
import { Properties } from "../../properties";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,16 +1,11 @@
|
||||
/// <reference path="../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../typings/chai/chai.d.ts" />
|
||||
/// <reference path="../../typings/archiver/archiver.d.ts" />
|
||||
/// <reference path="../../typings/xml/xml.d.ts" />
|
||||
|
||||
import * as fs from "fs";
|
||||
import {LocalPacker} from "../../export/packer/local";
|
||||
import {assert} from "chai";
|
||||
import {Document} from "../../docx/document";
|
||||
import {Properties} from "../../properties";
|
||||
import {DefaultStyle} from "../../styles/sample";
|
||||
import {Paragraph} from "../../docx/paragraph";
|
||||
import {DefaultStylesFactory} from "../../styles/factory";
|
||||
import { LocalPacker } from "../../export/packer/local";
|
||||
import { Document } from "../../docx/document";
|
||||
import { Properties } from "../../properties";
|
||||
import { DefaultStyle } from "../../styles/sample";
|
||||
import { Paragraph } from "../../docx/paragraph";
|
||||
import { DefaultStylesFactory } from "../../styles/factory";
|
||||
import { assert } from "chai";
|
||||
|
||||
describe("Packer", () => {
|
||||
let packer: LocalPacker;
|
||||
@ -49,7 +44,7 @@ describe("Packer", () => {
|
||||
clearInterval(int);
|
||||
try {
|
||||
assert(false, 'did not create a file within the alloted time');
|
||||
} catch (e){
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
}, 2000);
|
||||
|
@ -1,8 +1,5 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
|
||||
import {assert} from "chai";
|
||||
import {Numbering} from "../numbering";
|
||||
import { assert } from "chai";
|
||||
import { Numbering } from "../numbering";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
@ -10,7 +7,7 @@ function jsonify(obj: Object) {
|
||||
}
|
||||
|
||||
describe("", () => {
|
||||
|
||||
|
||||
let numbering = new Numbering;
|
||||
beforeEach(() => {
|
||||
numbering = new Numbering();
|
||||
|
@ -1,7 +1,5 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import {Properties} from "../properties";
|
||||
import {assert} from "chai";
|
||||
import { Properties } from "../properties";
|
||||
import { assert } from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
|
@ -1,8 +1,5 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Styles} from "../styles";
|
||||
import {assert} from "chai";
|
||||
import { Styles } from "../styles";
|
||||
import { assert } from "chai";
|
||||
|
||||
describe("Styles", () => {
|
||||
let styles: Styles;
|
||||
|
Reference in New Issue
Block a user