added properties
This commit is contained in:
28
ts/tests/propertiesTest.ts
Normal file
28
ts/tests/propertiesTest.ts
Normal 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");
|
||||
});
|
||||
})
|
||||
});
|
Reference in New Issue
Block a user