Skip to content

Commit 2f92c7b

Browse files
code cleanup console.log & remove async in tests
1 parent 647ee11 commit 2f92c7b

File tree

4 files changed

+12
-19
lines changed

4 files changed

+12
-19
lines changed

test/components/CrsSelector.nuxt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const vuetify = createVuetify({
2020
directives,
2121
})
2222

23-
describe("CrsSelector.vue", async () => {
23+
describe("CrsSelector.vue", () => {
2424
const pinia = createTestingPinia()
2525
setActivePinia(pinia)
2626
const geode_store = use_geode_store()

test/stores/Geode.nuxt.test.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { describe, test, expect, expectTypeOf, beforeEach, vi } from "vitest"
44
import { registerEndpoint } from "@nuxt/test-utils/runtime"
55
import back_schemas from "@geode/opengeodeweb-back/schemas.json"
66

7-
describe("Geode Store", async () => {
7+
describe("Geode Store", () => {
88
const pinia = createTestingPinia({
99
stubActions: false,
1010
})
@@ -20,7 +20,7 @@ describe("Geode Store", async () => {
2020
})
2121

2222
describe("state", () => {
23-
test("initial state", async () => {
23+
test("initial state", () => {
2424
expectTypeOf(geode_store.default_local_port).toBeString()
2525
expectTypeOf(geode_store.request_counter).toBeNumber()
2626
expectTypeOf(geode_store.is_running).toBeBoolean()
@@ -59,26 +59,19 @@ describe("Geode Store", async () => {
5959

6060
describe("base_url", () => {
6161
test("test is_cloud false", () => {
62-
console.log("is_cloud")
6362
infra_store.is_cloud = false
64-
console.log("is_cloud")
6563
infra_store.domain_name = "localhost"
66-
console.log("is_cloud")
67-
const url = geode_store.port
68-
console.log("port", url)
69-
const url2 = geode_store.base_url
70-
console.log("base_url", url2)
7164
expect(geode_store.base_url).toBe("http://localhost:5000")
7265
})
73-
test("test is_cloud true", async () => {
66+
test("test is_cloud true", () => {
7467
infra_store.is_cloud = true
7568
infra_store.ID = "123456"
7669
infra_store.domain_name = "example.com"
7770
expect(geode_store.base_url).toBe(
7871
"https://example.com:443/123456/geode",
7972
)
8073
})
81-
test("test is_cloud true, ID empty", async () => {
74+
test("test is_cloud true, ID empty", () => {
8275
infra_store.is_cloud = true
8376
infra_store.ID = ""
8477
infra_store.domain_name = "example.com"
@@ -100,8 +93,8 @@ describe("Geode Store", async () => {
10093
})
10194
})
10295

103-
describe("actions", async () => {
104-
describe("do_ping", async () => {
96+
describe("actions", () => {
97+
describe("do_ping", () => {
10598
const getFakeCall = vi.fn()
10699
registerEndpoint(back_schemas.opengeodeweb_back.ping.$id, getFakeCall)
107100

test/stores/Infra.nuxt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ describe("Infra Store", () => {
105105
})
106106

107107
describe("actions", () => {
108-
describe("create_connexion", async () => {
108+
describe("create_connexion", () => {
109109
test("test without end-point", async () => {
110110
await infra_store.create_connexion()
111111
expect(infra_store.is_connexion_launched).toBe(true)
112112
expect(feedback_store.server_error).toBe(true)
113113
})
114114
})
115-
describe("create_backend", async () => {
115+
describe("create_backend", () => {
116116
test("test without end-point", async () => {
117117
await infra_store.create_backend()
118118
expect(geode_store.is_running).toBe(false)

test/stores/Viewer.nuxt.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe("Viewer Store", () => {
6464
expect(viewer_store.base_url).toBe("ws://localhost:1234/ws")
6565
})
6666

67-
test("test is_cloud true", async () => {
67+
test("test is_cloud true", () => {
6868
infra_store.is_cloud = true
6969
infra_store.ID = "123456"
7070
infra_store.domain_name = "example.com"
@@ -73,7 +73,7 @@ describe("Viewer Store", () => {
7373
)
7474
})
7575

76-
test("test is_cloud true, ID empty", async () => {
76+
test("test is_cloud true, ID empty", () => {
7777
infra_store.is_cloud = true
7878
infra_store.ID = ""
7979
infra_store.domain_name = "example.com"
@@ -95,7 +95,7 @@ describe("Viewer Store", () => {
9595
})
9696
describe("actions", () => {
9797
// MISSING TEST ws_connect()
98-
describe("toggle_picking_mode", async () => {
98+
describe("toggle_picking_mode", () => {
9999
test("test true", async () => {
100100
await viewer_store.toggle_picking_mode(true)
101101
expect(viewer_store.picking_mode).toBe(true)

0 commit comments

Comments
 (0)