mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-29 01:58:54 +00:00
18 lines
492 B
TypeScript
18 lines
492 B
TypeScript
|
import { expect } from 'chai';
|
||
|
import * as path from 'path';
|
||
|
|
||
|
import * as updateLock from '~/lib/update-lock';
|
||
|
|
||
|
describe('lib/update-lock: unit tests', () => {
|
||
|
describe('lockPath', () => {
|
||
|
it('should return path prefix of service lockfiles on host', () => {
|
||
|
expect(updateLock.lockPath(123)).to.equal(
|
||
|
path.join(updateLock.BASE_LOCK_DIR, '123'),
|
||
|
);
|
||
|
expect(updateLock.lockPath(123, 'main')).to.equal(
|
||
|
path.join(updateLock.BASE_LOCK_DIR, '123', 'main'),
|
||
|
);
|
||
|
});
|
||
|
});
|
||
|
});
|