logo.test.ts 778 B

1234567891011121314151617181920212223242526
  1. import { describe, it, expect, beforeEach, afterEach } from "vitest"
  2. import { TestRig } from "./test-helper.js"
  3. describe("CLI Logo Display", () => {
  4. let rig: TestRig
  5. beforeEach(({ task }) => {
  6. rig = new TestRig(task.name)
  7. })
  8. afterEach(async () => {
  9. await rig.cleanup()
  10. })
  11. it("should display the logo on startup with valid config", async () => {
  12. const run = await rig.runInteractive([])
  13. expect(run.getStrippedOutput()).toContain("⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶")
  14. await run.sendCtrlC()
  15. })
  16. it("should not display the logo with --nosplash", async () => {
  17. const run = await rig.runInteractive(["--nosplash"])
  18. expect(run.getStrippedOutput()).not.toContain("⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶")
  19. await run.sendCtrlC()
  20. })
  21. })