mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-06 07:50:37 +00:00
17 lines
454 B
JavaScript
17 lines
454 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
const OutputListener = require('../lib/output-listener');
|
|
|
|
describe('output-listener', () => {
|
|
it('receives and exposes data', () => {
|
|
const listener = new OutputListener();
|
|
const listen = listener.listener;
|
|
listen(Buffer.from('foo'));
|
|
listen(Buffer.from('bar'));
|
|
listen(Buffer.from('baz'));
|
|
expect(listener.contents).toEqual('foobarbaz');
|
|
});
|
|
});
|