mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 14:37:49 +00:00
Convert test/18-startup.coffee to typescript
Change-type: patch
This commit is contained in:
parent
70b0705551
commit
d3221ca235
@ -1,13 +0,0 @@
|
||||
{ expect } = require './lib/chai-config'
|
||||
|
||||
{ Supervisor } = require '../src/supervisor'
|
||||
|
||||
describe 'Startup', ->
|
||||
it 'should startup correctly', ->
|
||||
supervisor = new Supervisor()
|
||||
expect(supervisor.init()).to.not.throw
|
||||
expect(supervisor.db).to.not.be.null
|
||||
expect(supervisor.config).to.not.be.null
|
||||
expect(supervisor.logger).to.not.be.null
|
||||
expect(supervisor.deviceState).to.not.be.null
|
||||
expect(supervisor.apiBinder).to.not.be.null
|
16
test/18-startup.ts
Normal file
16
test/18-startup.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Supervisor } from '../src/supervisor';
|
||||
import { expect } from './lib/chai-config';
|
||||
|
||||
describe('Startup', () => {
|
||||
it('should startup correctly', function() {
|
||||
const supervisor = new Supervisor();
|
||||
expect(supervisor.init()).to.not.throw;
|
||||
// Cast as any to access private properties
|
||||
const anySupervisor = supervisor as any;
|
||||
expect(anySupervisor.db).to.not.be.null;
|
||||
expect(anySupervisor.config).to.not.be.null;
|
||||
expect(anySupervisor.logger).to.not.be.null;
|
||||
expect(anySupervisor.deviceState).to.not.be.null;
|
||||
expect(anySupervisor.apiBinder).to.not.be.null;
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user