19 lines
797 B
JavaScript
19 lines
797 B
JavaScript
import assert from "node:assert/strict";
|
|
import { describe, it } from "node:test";
|
|
import { createLocalProfileStartState } from "../src/stageFlow.mjs";
|
|
|
|
describe("stage flow", () => {
|
|
it("starts the automatic local profile without connecting to the backend", () => {
|
|
const state = createLocalProfileStartState({ automatic: true });
|
|
|
|
assert.equal(state.backendConnected, false);
|
|
assert.equal(state.buttonLabel, "再测一次,生成分享卡");
|
|
assert.equal(state.stageStatus.local, "running");
|
|
assert.equal(state.stageStatus.request, "locked");
|
|
assert.equal(state.stageStatus.geolocation, "locked");
|
|
assert.equal(state.stageStatus.media, "locked");
|
|
assert.match(state.recordingText, /初步画像/);
|
|
assert.match(state.recordingText, /不发送/);
|
|
});
|
|
});
|