The world didn’t need another tesing framework. So we built yet another one. A Golo one: Golosa Test
Golosa Test is a behavior-driven development framework for testing mainly inspired by Jasmine (a JS behavioral testing framework). Since a snippet is worth a thousand words:
module my.awesome.test
#The only import gather all the Golosa SA API import golosa.test.$
#A test module must have a test method function test = {
#Define a Test suite with a description and an executable code block (ie. a lambda) describe("A test suite", {
#A lambda can contain any executable code necessary, be careful with Golo scoping rules var aList = null
#Setting up the test fixture. beforeEach({ aList = list[] aList: append("something") })
#Defines a specification it("contains a specification with an expectation", { expect(aList: size()): toBe(1) expect(aList: isEmpty()): not(): toBeTrue() })
#Disable a suite or a spec by prefixing it with 'x' xit("contains something", { expect("something"): toBeIn(aList) })
#Tear down the test fixture to return to the original state. afterEach({ aList = null }) }) }
Do not trust this snippet, test by yourself! Go to Golosa Test project page and give it a try…