refactor: move hoppscotch-common tests to vitest (#3154)

This commit is contained in:
Andrew Bastin
2023-06-22 00:36:25 +05:30
committed by GitHub
parent fc3e3aeaec
commit 6f35574d68
21 changed files with 698 additions and 281 deletions

View File

@@ -1,3 +1,4 @@
import { describe, expect, test } from "vitest"
import { getEditorLangForMimeType } from "../editorutils"
describe("getEditorLangForMimeType", () => {

View File

@@ -1,3 +1,4 @@
import { describe, test, expect } from "vitest"
import jsonParse from "../jsonParse"
describe("jsonParse", () => {

View File

@@ -1,10 +1,11 @@
import { vi, beforeEach, describe, expect, test } from "vitest"
import { getPlatformSpecialKey } from "../platformutils"
describe("getPlatformSpecialKey", () => {
let platformGetter
beforeEach(() => {
platformGetter = jest.spyOn(navigator, "platform", "get")
platformGetter = vi.spyOn(navigator, "platform", "get")
})
test("returns '⌘' for Apple platforms", () => {