Skip to content

richardspence/TypeScriptMock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

TypeScriptMock

This a thin wrapper around jasmine spies that allows

Example usage:

export interface IBiz{ 
	helloWorld():string
}

export class Program{ 
	private _biz:IBiz; 
	constructor(biz:IBiz){
  		this._biz = biz;
	}

	public printHelloWorld()
	{ 
		console.log(this._biz.helloWorld()); 
	}
 }




var mock = new Mock<IBiz>();
mock.setup(p=>p.helloWorld).andReturns("Hey");

//use the mock
var p = new Program(mock.getObject());
p.printHelloWorld();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published