rearranged test locations
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
"pretest": "tsc -p ts/tests",
|
||||
"test": "./node_modules/.bin/mocha ./build/tests/**/*Test.js",
|
||||
"test": "mocha ./build/tests/**/*.*",
|
||||
"prepublish": "tsc -p ts"
|
||||
},
|
||||
"repository": {
|
||||
|
22
ts/tests/_testTemplate.ts
Normal file
22
ts/tests/_testTemplate.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
|
||||
import {assert} from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
return JSON.parse(stringifiedJson);
|
||||
}
|
||||
|
||||
describe("", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
});
|
||||
|
||||
describe("#methodName()", () => {
|
||||
it("should ", () => {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
@ -1,12 +1,12 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import {Body} from "../docx/document/body";
|
||||
/// <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 {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,6 +1,7 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import * as docx from "../docx";
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import * as docx from "../../../docx";
|
||||
import {assert} from "chai";
|
||||
|
||||
describe("Document", () => {
|
@ -1,6 +1,7 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import {Attributes} from "../docx/xml-components";
|
||||
/// <reference path="../../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Attributes} from "../../../../docx/xml-components";
|
||||
import {assert} from "chai";
|
||||
|
||||
describe("Attribute", () => {
|
@ -1,6 +1,7 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import {ThematicBreak} from "../docx/paragraph/border";
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {ThematicBreak} from "../../../docx/paragraph/border";
|
||||
import {assert} from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
@ -1,6 +1,7 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import {Style} from "../docx/paragraph/style";
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Style} from "../../../docx/paragraph/style";
|
||||
import {assert} from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
@ -1,6 +1,7 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import * as docx from "../docx";
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import * as docx from "../../../docx";
|
||||
import {assert} from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
@ -1,7 +1,8 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
import {Run} from "../docx/run";
|
||||
import {TextRun} from "../docx//run/text-run";
|
||||
/// <reference path="../../../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../../../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Run} from "../../../docx/run";
|
||||
import {TextRun} from "../../../docx/run/text-run";
|
||||
import {assert} from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
@ -1,12 +1,11 @@
|
||||
/// <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 * as docx from "../docx";
|
||||
import {Attributes} from "../docx/xml-components";
|
||||
import {Properties} from "../properties";
|
||||
/// <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 * as docx from "../../docx";
|
||||
import {Attributes} from "../../docx/xml-components";
|
||||
import {Properties} from "../../properties";
|
||||
import {assert} from "chai";
|
||||
|
||||
function jsonify(obj: Object) {
|
@ -1,17 +1,17 @@
|
||||
/// <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" />
|
||||
/// <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 {LocalPacker} from "../export/packer/local";
|
||||
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 {Document} from "../../docx/document";
|
||||
import {Properties} from "../../properties";
|
||||
import {DefaultStyle} from "../../styles/sample";
|
||||
import {Paragraph} from "../../docx/paragraph";
|
||||
import {DefaultStylesFactory} from "../../styles/factory";
|
||||
|
||||
describe.only("Packer", () => {
|
||||
describe("Packer", () => {
|
||||
let packer: LocalPacker;
|
||||
let stylesFactory: DefaultStylesFactory;
|
||||
|
||||
@ -34,8 +34,8 @@ describe.only("Packer", () => {
|
||||
});
|
||||
|
||||
describe("#pack()", () => {
|
||||
|
||||
it("should create a standard docx file", (done) => {
|
||||
it("should create a standard docx file", function (done) {
|
||||
this.timeout(99999999);
|
||||
packer.pack();
|
||||
setTimeout(done, 1900);
|
||||
});
|
24
ts/tests/numberingTest.ts
Normal file
24
ts/tests/numberingTest.ts
Normal file
@ -0,0 +1,24 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
|
||||
import {assert} from "chai";
|
||||
import {Numbering} from "../numbering";
|
||||
|
||||
function jsonify(obj: Object) {
|
||||
let stringifiedJson = JSON.stringify(obj);
|
||||
return JSON.parse(stringifiedJson);
|
||||
}
|
||||
|
||||
describe("", () => {
|
||||
|
||||
let numbering = new Numbering;
|
||||
beforeEach(() => {
|
||||
numbering = new Numbering();
|
||||
});
|
||||
|
||||
describe("#methodName()", () => {
|
||||
it("should ", () => {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
@ -1,5 +1,6 @@
|
||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||
/// <reference path="../typings/chai/chai.d.ts" />
|
||||
|
||||
import {Styles} from "../styles";
|
||||
import {assert} from "chai";
|
||||
|
||||
|
Reference in New Issue
Block a user