Skip to main content
100%

Gist 312231

✓ Published0🌍 Public
TTBD
Last edited Feb 23, 2010
Created on Feb 23, 2010

This example demonstrates how CoffeeScript files can be compiled and evaluated at runtime to run a suite of automated tests. It loads the CoffeeScript compiler along with supporting modules for rewriting, scope analysis, node parsing, and lexical analysis through custom `require` calls. Test files are discovered from the `../test/` directory using `system.files` with a wildcard pattern, and their contents are compiled with `CoffeeScript.compile` before being executed via `eval`. The code counts successful assertions through the `ok` and `throws` helper functions, then reports the total test count and execution time in seconds after processing all files.

AI-generated description

Similar vizzes