fixed all tslint errors

This commit is contained in:
Dolan Miu
2016-05-26 15:08:34 +01:00
parent f075d3b719
commit a2284df881
42 changed files with 253 additions and 254 deletions

View File

@ -1,54 +1,54 @@
/// <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 {TextRun} from "../docx//run/text-run";
import {assert} from "chai";
function jsonify(obj: Object) {
var stringifiedJson = JSON.stringify(obj);
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("Run", () => {
var run: Run;
let run: Run;
beforeEach(() => {
run = new Run();
});
describe('#bold()', () => {
describe("#bold()", () => {
it("it should add bold to the properties", () => {
run.bold();
var newJson = jsonify(run);
let newJson = jsonify(run);
assert.equal(newJson.root[0].root[0].rootKey, "w:b");
});
});
describe('#italic()', () => {
describe("#italic()", () => {
it("it should add italics to the properties", () => {
run.italic();
var newJson = jsonify(run);
let newJson = jsonify(run);
assert.equal(newJson.root[0].root[0].rootKey, "w:i");
});
});
describe('#underline()', () => {
describe("#underline()", () => {
it("it should add underline to the properties", () => {
run.underline();
var newJson = jsonify(run);
let newJson = jsonify(run);
assert.equal(newJson.root[0].root[0].rootKey, "w:u");
});
});
});
describe('TextRun', () => {
var run: TextRun;
describe("TextRun", () => {
let run: TextRun;
describe('#constructor()', () => {
describe("#constructor()", () => {
it("should add text into run", () => {
run = new TextRun("test");
var newJson = jsonify(run);
let newJson = jsonify(run);
assert.equal(newJson.root[1].root, "test");
});
});