Commit c644fb39 authored by Grant's avatar Grant
Browse files

fix TESTKIT_HEADFUL

parent 736422ea
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
import puppeteer, { Browser } from "puppeteer";
import { IMessage, ServiceAPI } from "./abstract.api";
import { Software } from "..";
import { useHeadless } from "../const";

export interface IMbinNotification {
  id: string;
@@ -19,7 +20,7 @@ export class MBinAPI implements ServiceAPI<IMbinNotification> {
    }

    this.browser = await puppeteer.launch({
      headless: !!process.env.TESTKIT_HEADFUL,
      headless: useHeadless,
    });
    const page = await this.browser.newPage();

+5 −0
Original line number Diff line number Diff line
export const SOFTWARES = ["MASTODON", "LEMMY", "PIEFED", "MBIN"] as const;
export type SOFTWARES = (typeof SOFTWARES)[number];

const testkit_headful = process.env.TESTKIT_HEADFUL;
export const useHeadless = testkit_headful
  ? testkit_headful.toLowerCase() !== "true" && testkit_headful !== "1"
  : true;