TypeScript comes with the full source code and unit tests.
How do I run these tests? Or is it only by building the whole thing?
TypeScript comes with the full source code and unit tests.
How do I run these tests? Or is it only by building the whole thing?
On Windows (preferably a VS2012 or 2010 command prompt, or with suitable stuff on the PATH), run:
nmake runtests
You'll need to have the TYPESCRIPT_HOST environment variable set to node (with node.js installed). Alternatively, nmake runtests HOST=node.
You can also run a subset of tests:
nmake runtests tests=tests\compiler\someVariousTest.ts
There's also a smaller subset for compiler-only tests:
nmake runtests-compiler