const __vite_ssr_import_0__ = await __vite_ssr_import__("/@fs/C:/Users/Admin/AppData/Local/npm-cache/_npx/69c381f8ad94b576/node_modules/vitest/dist/index.js", {"importedNames":["describe","expect","it"]});
const __vite_ssr_import_1__ = await __vite_ssr_import__("/web/src/entities/setup/steps.ts", {"importedNames":["neighbour","stepIndex"]});


const STEPS = [
	"welcome",
	"system",
	"models"
];
(0,__vite_ssr_import_0__.describe)("wizard steps", () => {
	(0,__vite_ssr_import_0__.it)("finds a step and falls back to the first for an unknown one", () => {
		(0,__vite_ssr_import_0__.expect)((0,__vite_ssr_import_1__.stepIndex)(STEPS, "models")).toBe(2);
		(0,__vite_ssr_import_0__.expect)((0,__vite_ssr_import_1__.stepIndex)(STEPS, "nope")).toBe(0);
	});
	(0,__vite_ssr_import_0__.it)("moves to the next and previous step and stops at the ends", () => {
		(0,__vite_ssr_import_0__.expect)((0,__vite_ssr_import_1__.neighbour)(STEPS, "welcome", 1)).toBe("system");
		(0,__vite_ssr_import_0__.expect)((0,__vite_ssr_import_1__.neighbour)(STEPS, "models", -1)).toBe("system");
		(0,__vite_ssr_import_0__.expect)((0,__vite_ssr_import_1__.neighbour)(STEPS, "welcome", -1)).toBe("welcome");
		(0,__vite_ssr_import_0__.expect)((0,__vite_ssr_import_1__.neighbour)(STEPS, "models", 1)).toBe("models");
	});
});

//# vitestCache=W3siZmlsZSI6IjEiLCJpZCI6IjEiLCJpbXBvcnRzIjoiMiIsIm1hcHBpbmdzIjpmYWxzZSwiZGVwcyI6IjMiLCJkeW5hbWljRGVwcyI6IjQiLCJzdGF0aWNNb2NrcyI6bnVsbCwiaGFzQ292ZXJhZ2VEYXRhIjpmYWxzZX0sIkQ6L0dpdEh1Yi9WaWNlQ3V0L3dlYi9zcmMvZW50aXRpZXMvc2V0dXAvc3RlcHMudGVzdC50cyIseyJ1cmxzIjoiNSIsImlkcyI6IjYifSxbIjciLCI4Il0sW10sWyI3IiwiOCJdLHt9LCIvQGZzL0M6L1VzZXJzL0FkbWluL0FwcERhdGEvTG9jYWwvbnBtLWNhY2hlL19ucHgvNjljMzgxZjhhZDk0YjU3Ni9ub2RlX21vZHVsZXMvdml0ZXN0L2Rpc3QvaW5kZXguanMiLCIvd2ViL3NyYy9lbnRpdGllcy9zZXR1cC9zdGVwcy50cyJd
//# vitestSourceMap={"version":3,"mappings":"AAAA;AAEA;;;AAEA,MAAM,QAAQ;CAAC;CAAW;CAAU;AAAQ;AAE5C,mCAAS,sBAAsB;CAC7B,6BAAG,qEAAqE;EACtE,iCAAO,oCAAU,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;EACzC,iCAAO,oCAAU,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;CACzC,CAAC;CAED,6BAAG,mEAAmE;EACpE,iCAAO,oCAAU,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ;EACpD,iCAAO,oCAAU,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ;EACpD,iCAAO,oCAAU,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS;EACtD,iCAAO,oCAAU,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ;CACrD,CAAC;AACH,CAAC","names":[],"ignoreList":[],"sources":["steps.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\r\n\r\nimport { neighbour, stepIndex } from \"./steps\";\r\n\r\nconst STEPS = [\"welcome\", \"system\", \"models\"];\r\n\r\ndescribe(\"wizard steps\", () => {\r\n  it(\"finds a step and falls back to the first for an unknown one\", () => {\r\n    expect(stepIndex(STEPS, \"models\")).toBe(2);\r\n    expect(stepIndex(STEPS, \"nope\")).toBe(0);\r\n  });\r\n\r\n  it(\"moves to the next and previous step and stops at the ends\", () => {\r\n    expect(neighbour(STEPS, \"welcome\", 1)).toBe(\"system\");\r\n    expect(neighbour(STEPS, \"models\", -1)).toBe(\"system\");\r\n    expect(neighbour(STEPS, \"welcome\", -1)).toBe(\"welcome\");\r\n    expect(neighbour(STEPS, \"models\", 1)).toBe(\"models\");\r\n  });\r\n});\r\n"],"file":"/web/src/entities/setup/steps.test.ts"}