added properties

This commit is contained in:
Dolan Miu
2016-04-03 20:00:30 +01:00
parent 9b6f6082f5
commit 4d8e443962
6 changed files with 240 additions and 5 deletions

View File

@ -0,0 +1,28 @@
/// <reference path="../typings/mocha/mocha.d.ts" />
/// <reference path="../typings/chai/chai.d.ts" />
import {Properties} from "../properties";
import {assert} from "chai";
function jsonify(obj: Object) {
var stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("Properties", () => {
var properties: Properties;
beforeEach(() => {
});
describe("#constructor()", () => {
it("should create properties with a title", () => {
properties = new Properties({
title: "test document"
});
var newJson = jsonify(properties);
assert(newJson.coreProperties[1].title === "test document");
});
})
});