Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Roku unit testing

Unit testing. BrightScript. Without a device. Yep, you read that right.

How does it work?

There are two libraries that make the magic happen: brs and roca. brs is an interpreter for the BrightScript language, and roca is a test runner (think: mocha for BrightScript).

Essentially, the flow is:

  1. You tell roca to find and run your tests.
  2. roca tells brs to parse and interpret all of your source files to create an execution scope that each test will run in.
  3. roca sends each test file to brs, which parses/interprets/executes the test.
  4. Based on the asserts in each test, roca reports the results in TAP output, which gets automatically parsed and reported back to you in the format of whichever Mocha reporter you choose.

How do I use it?

See the Quick start page for a guide to installing and writing your first test case.