Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

859 B
Raw Blame
import { afterEach, describe, expect, it, vi } from 'vitest';
import { OutputFormatter } from '../../cli-core/src/output.js';

describe('#2814 spinner output', () => {
  afterEach(() => {
    vi.restoreAllMocks();
  });

  it('emits no transient frames or clearing bytes when stdout is not a TTY', () => {
    const isTTY = Object.getOwnPropertyDescriptor(process.stdout, 'isTTY');
    Object.defineProperty(process.stdout, 'isTTY', { configurable: true, value: false });
    const write = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
    try {
      const spinner = new OutputFormatter({ color: false }).createSpinner({ text: 'Checking...' });
      spinner.start();
      spinner.stop();
      expect(write).not.toHaveBeenCalled();
    } finally {
      if (isTTY) Object.defineProperty(process.stdout, 'isTTY', isTTY);
    }
  });
});