File size: 512 Bytes
ec17af3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { describe, expect, it } from "vitest";
import { useRecorderStore } from "@/store/useRecorderStore";

const getState = () => useRecorderStore.getState();

describe("recorder state machine", () => {
  it("transitions between statuses", () => {
    getState().setStatus("recording");
    expect(getState().status).toBe("recording");
    getState().setStatus("paused");
    expect(getState().status).toBe("paused");
    getState().setStatus("review");
    expect(getState().status).toBe("review");
  });
});