npm.io
0.11.10 • Published 4 years agoCLI

firescript-test

Licence
MIT
Version
0.11.10
Deps
11
Size
22 kB
Vulns
0
Weekly
0

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.

Keywords