Skip to content

Commit e251104

Browse files
MaxNumeriquegithub-actions[bot]
authored andcommitted
Apply prepare changes
1 parent f3140b6 commit e251104

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/unit/composables/ProjectManager.nuxt.test.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,20 @@ vi.mock("@/composables/api_fetch.js", () => ({
7777
api_fetch: vi.fn(async (_req, options = {}) => {
7878
const response = {
7979
_data: new Blob(["zipcontent"], { type: "application/zip" }),
80-
headers: { get: (k) => (k === "new-file-name" ? "project_123.zip" : null) },
80+
headers: {
81+
get: (k) => (k === "new-file-name" ? "project_123.zip" : null),
82+
},
8183
}
8284
if (options.response_function) {
8385
await options.response_function(response)
8486
}
8587
return response
8688
}),
8789
}))
88-
vi.stubGlobal("$fetch", vi.fn(async () => ({ snapshot: {} })))
90+
vi.stubGlobal(
91+
"$fetch",
92+
vi.fn(async () => ({ snapshot: {} })),
93+
)
8994
vi.stubGlobal("useDataBaseStore", () => ({ items: {} }))
9095

9196
// Mock du store base de données pour éviter Object.entries(undefined)
@@ -108,7 +113,9 @@ describe("ProjectManager composable", () => {
108113
test("importProjectFile loads snapshot", async () => {
109114
const { importProjectFile } = useProjectManager()
110115

111-
const file = new Blob(['{"dataBase":{"db":{}}}'], { type: "application/json" })
116+
const file = new Blob(['{"dataBase":{"db":{}}}'], {
117+
type: "application/json",
118+
})
112119
await importProjectFile(file)
113120

114121
const infra_store = useInfraStore()

0 commit comments

Comments
 (0)