mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-20 04:53:43 +02:00
Fix test breaking due to chrome.* api
This commit is contained in:
parent
6631dfdea3
commit
015ac7d46e
1 changed files with 3 additions and 1 deletions
|
@ -3,10 +3,12 @@ import { shortCategoryName } from "./categoryUtils";
|
|||
import { GenericUtils } from "./genericUtils";
|
||||
import * as CompileConfig from "../../config.json";
|
||||
|
||||
const inTest = typeof chrome === "undefined";
|
||||
|
||||
const chapterNames = CompileConfig.categoryList.filter((code) => code !== "chapter")
|
||||
.map((code) => ({
|
||||
code,
|
||||
name: chrome.i18n.getMessage("category_" + code)
|
||||
name: !inTest ? chrome.i18n.getMessage("category_" + code) : code
|
||||
}));
|
||||
|
||||
export function exportTimes(segments: SponsorTime[]): string {
|
||||
|
|
Loading…
Reference in a new issue