Add standalone desktop launch modes
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { activeAppFromLocation } from "./appRouting";
|
||||
|
||||
describe("activeAppFromLocation", () => {
|
||||
it.each([
|
||||
["/", "", "", "word"],
|
||||
["/qword", "", "", "word"],
|
||||
["/qexcell", "", "", "sheets"],
|
||||
["/qpowerpoint", "", "", "slides"],
|
||||
["/qoutlook", "", "", "mail"],
|
||||
["/index.html", "#/qexcell", "", "sheets"],
|
||||
["/index.html", "#qpowerpoint", "", "slides"],
|
||||
["/index.html", "", "?app=qoutlook", "mail"],
|
||||
["/index.html", "", "?module=pptx", "slides"],
|
||||
["/unknown", "", "", "word"]
|
||||
])("определяет приложение для pathname=%s hash=%s search=%s", (pathname, hash, search, expected) => {
|
||||
expect(activeAppFromLocation({ pathname, hash, search })).toBe(expected);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user