firescript-test

Integration & Syntax tests for Firescript

Usage no npm install needed!

<script type="module">
  import firescriptTest from 'https://cdn.skypack.dev/firescript-test';
</script>

README

Firescript test

Test runner for unit and integration tests written in Firescipt or Javascript.

Usage

firetest run [filePattern]

Writing tests

Firetest looks for tests unter tests/**/*.test.fire or tests/**/*.test.js per default. Firetest tests are simply static classes which names are ending with Test

export class MyFirstTest
  firstTest ()
    # place your test code here
    inspect('banana').isEql('banana')

  secondTest ()
    # fail a test by throwing an error
    throw Error('Test failed')

Write for each test a test method. The method name has to end with Test. For example firstTest, secondTest and so on. Methods which are not ending with Test are getting ignored by the runner.