Last active
March 18, 2021 20:10
Revisions
-
up1 revised this gist
Mar 11, 2017 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ { "name": "helloworld", "version": "1.0.0", "description": "TDD with TypeScript", "main": "index.js", "scripts": { "build": "tsc", "pretest": "npm run build", "test": "mocha dist/tests" } ... } -
up1 revised this gist
Mar 11, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ export class HelloWorld { public sayHi(name: string): string { return "Hi, " + name; } } -
up1 revised this gist
Mar 11, 2017 . 1 changed file with 28 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ import "mocha"; import "should"; import { HelloWorld } from "../src/HelloWorld"; describe("HelloWorld", () => { let tested: HelloWorld; beforeEach(() => tested = new HelloWorld()); describe("Say hi", () => { it("should say Hi, somkiat", () => { const result = tested.sayHi("somkiat"); const expected = "Hi, somkiat"; result.should.be.equal(expected); }); it("should say Hi, somkiat2", () => { const result = tested.sayHi("somkiat2"); const expected = "Hi, somkiat2"; result.should.be.equal(expected); }); }); }); -
up1 revised this gist
Mar 11, 2017 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ { "compilerOptions": { "target": "ES6", "module": "commonjs", "noEmitOnError": true, "noImplicitAny": false, "experimentalDecorators": true, "sourceMap": true, "outDir": "dist" }, "exclude": [ "dist", "node_modules" ] } -
up1 created this gist
Mar 11, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ { "name": "helloworld", "version": "1.0.0", "description": "TDD with TypeScript", "main": "index.js", "scripts": { "test": "mocha" }, "devDependencies": { "@types/mocha": "2.2.39", "@types/should": "8.1.30", "mocha": "3.2.0", "should": "11.2.0", "typescript": "2.1.6" } }