Commit 3b453cb7 authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Add mocha, chai, sinon testing

parent f8b73e09
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"dist/" "dist/"
], ],
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "mocha -r ts-node/register src/**/*.spec.ts"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"devDependencies": { "devDependencies": {
"@types/chai": "^3.4.35", "@types/chai": "^3.4.35",
"@types/mocha": "^2.2.39", "@types/mocha": "^2.2.39",
"@types/moment-timezone": "^0.2.34" "@types/moment-timezone": "^0.2.34",
"@types/sinon": "^1.16.35", "@types/sinon": "^1.16.35",
"chai": "^3.5.0", "chai": "^3.5.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
"gulp-typescript": "^3.1.5", "gulp-typescript": "^3.1.5",
"mocha": "^3.2.0", "mocha": "^3.2.0",
"sinon": "^1.17.7", "sinon": "^1.17.7",
"ts-node": "^2.1.0",
"tslint": "^4.4.2", "tslint": "^4.4.2",
"typescript": "^2.1.6" "typescript": "^2.1.6"
}, },
"dependencies": { "dependencies": {}
}
} }
import ContentLine from "./ContentLine";
import { expect } from "chai";
import "mocha";
describe("Hello", () => {
it("Should say hi", () => {
expect("hi").to.equal("hi");
});
});
...@@ -12,7 +12,7 @@ import { isAlpha } from "./util"; ...@@ -12,7 +12,7 @@ import { isAlpha } from "./util";
* while leaving the specific features required by individual component objects * while leaving the specific features required by individual component objects
* unfilled. * unfilled.
*/ */
export class ContentLine { export default class ContentLine {
private _name: string; private _name: string;
private _params: string[] = []; private _params: string[] = [];
private _value: string; private _value: string;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment