mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-22 15:02:22 +00:00
1325fb8c9a
Simplify expect semantics in tests. Change-type: patch Signed-off-by: Scott Lowe <scott@balena.io>
18 lines
480 B
TypeScript
18 lines
480 B
TypeScript
import { expect } from 'chai';
|
|
import { balenaAPIMock, runCommand } from '../../helpers';
|
|
|
|
describe('balena env rm', function() {
|
|
it('should successfully delete an environment variable', async () => {
|
|
const mock = balenaAPIMock();
|
|
mock.delete(/device_environment_variable/).reply(200, 'OK');
|
|
|
|
const { out, err } = await runCommand('env rm 144690 -d -y');
|
|
|
|
expect(out.join('')).to.equal('');
|
|
expect(err.join('')).to.equal('');
|
|
|
|
// @ts-ignore
|
|
mock.remove();
|
|
});
|
|
});
|