Make the event-tracker module a singleton

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver
2020-06-04 10:21:39 +01:00
parent 138b1b4496
commit 389e14ec6b
16 changed files with 326 additions and 305 deletions

View File

@ -216,9 +216,6 @@ describe('deviceState', () => {
let deviceState: DeviceState;
before(async () => {
await prepare();
const eventTracker = {
track: console.log,
};
stub(Service as any, 'extendEnvVars').callsFake((env) => {
env['ADDITIONAL_ENV_VAR'] = 'foo';
@ -231,7 +228,6 @@ describe('deviceState', () => {
});
deviceState = new DeviceState({
eventTracker: eventTracker as any,
logger: logger as any,
apiBinder: null as any,
});