Merged in feature/SW-2320-languagebased-hide-for-next-release (pull request #1937)
Language based alternative to HIDE_FOR_NEXT_RELEASE Approved-by: Anton Gunnarsson
This commit is contained in:
18
apps/scandic-web/env/isLangLive.test.ts
vendored
Normal file
18
apps/scandic-web/env/isLangLive.test.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { describe, expect, it } from "@jest/globals"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
import { isLangLive } from "./isLangLive"
|
||||
|
||||
describe("hideForNextRelease", () => {
|
||||
it("should return true if en is part of live languages", () => {
|
||||
expect(isLangLive(Lang.en, ["en", "sv"])).toBe(true)
|
||||
expect(isLangLive(Lang.en, ["en"])).toBe(true)
|
||||
})
|
||||
|
||||
it("should return false if en is not part of live languages", () => {
|
||||
expect(isLangLive(Lang.en, [])).toBe(false)
|
||||
expect(isLangLive(Lang.en, ["sv"])).toBe(false)
|
||||
expect(isLangLive(Lang.en, ["sv,fi"])).toBe(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user