added tests
This commit is contained in:
@ -4,8 +4,8 @@
|
|||||||
"description": "Generate .docx documents with JavaScript (formerly Office-Clippy)",
|
"description": "Generate .docx documents with JavaScript (formerly Office-Clippy)",
|
||||||
"main": "build/build.js",
|
"main": "build/build.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"pretest": "tsc ts/test/*Test.ts --module commonjs",
|
"pretest": "tsc ts/tests/*Test.ts --module commonjs --outDir ./build/tests",
|
||||||
"test": "test"
|
"test": "mocha ./build/tests/*.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
/// <reference path="../docx/docx.ts" />
|
||||||
|
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||||
|
describe('Calculator', () => {
|
||||||
|
var document : docx.Docx;
|
||||||
|
|
||||||
|
/*beforeEach(function () {
|
||||||
|
subject = new Calculator();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('#add', () => {
|
||||||
|
it('should add two numbers together', () => {
|
||||||
|
var result : number = subject.add(2, 3);
|
||||||
|
if (result !== 5) {
|
||||||
|
throw new Error('Expected 2 + 3 = 5 but was ' + result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});*/
|
||||||
|
describe('#test', () => {
|
||||||
|
console.log(new docx.Docx);
|
||||||
|
});
|
||||||
|
});
|
@ -7,5 +7,8 @@
|
|||||||
"outFile": "../build/build.js",
|
"outFile": "../build/build.js",
|
||||||
"sourceRoot": "./",
|
"sourceRoot": "./",
|
||||||
"rootDir": "./"
|
"rootDir": "./"
|
||||||
}
|
},
|
||||||
|
"exclude": [
|
||||||
|
"tests"
|
||||||
|
]
|
||||||
}
|
}
|
Reference in New Issue
Block a user