mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 21:57:54 +00:00
652b596c80
We add a bunch of additional unit tests, and also a coverage report using istanbul. The tests are not meant to cover everything, but they're a first attempt at having *some* unit testing on the supervisor. There's much to improve but hopefully it helps catch obvious errors. Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
20 lines
519 B
CoffeeScript
20 lines
519 B
CoffeeScript
process.env.ROOT_MOUNTPOINT = './test/data'
|
|
process.env.BOOT_MOUNTPOINT = '/mnt/boot'
|
|
process.env.CONFIG_JSON_PATH = '/config.json'
|
|
process.env.DATABASE_PATH = './test/data/database.sqlite'
|
|
process.env.DATABASE_PATH_2 = './test/data/database2.sqlite'
|
|
process.env.DATABASE_PATH_3 = './test/data/database3.sqlite'
|
|
process.env.LED_FILE = './test/data/led_file'
|
|
|
|
m = require 'mochainon'
|
|
|
|
{ stub } = m.sinon
|
|
|
|
dbus = require 'dbus-native'
|
|
|
|
stub(dbus, 'systemBus').returns({
|
|
invoke: (obj, cb) ->
|
|
console.log(obj)
|
|
cb()
|
|
})
|