Skip to content

jer0ge/hackmud-unit-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hackmud-unit-poc

Proof-of-concept for unit testing hackmud scripts This projects attempts to demonstrate:

  • calling the top-level anonymous function (context,args) {} of a hackmud script within a unit test and obtaining its output
  • mocking or stubbing scriptor / hackmud api calls (such as #s)

In this example, an arbirary stub object defined within the test class is injected in place of #s.accts.balance. In a real scenario, a js mocking framework of choice such as sinon could be used.

how to run

You need nodejs to run this project. Run the unit tests with:

npm test

About

prof-of-concept for unit testing hackmud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published