<commit_before>const puppeteer = require("puppeteer")
import PuppeteerUtils from "../PuppeteerUtils"

const TIMEOUT = 5000
const SIZE = 50

describe("Size", () => {
    let browser: any
    let page: any

    beforeAll(async () => {
        browser = await puppeteer.launch({
            ignoreHTTPSErrors: true,
            args: ["--no-sandbox", "--disable-setuid-sandbox", "--ignore-certificate-errors"],
        })
        page = await browser.newPage()
    }, TIMEOUT)

    afterAll(async (done: () => void) => {
        await page.close()
        await browser.close()
        done()
    })

    test("Width", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(element.width).toBe(SIZE)
    })

    test("Width full content", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width-full-content")

        const content = await PuppeteerUtils.evalUiElement(page, "content")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(element.width).toBe(content.width)
    })

    test("Width full with padding", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width-full-with-padding")

        const content = await PuppeteerUtils.evalUiElement(page, "content")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(element.width).toBe(content.width - 100)
    })

    test("Width full with right son", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width-full-with-right-son")

        const subscreen = await PuppeteerUtils.evalUiElement(page, "subscreen")
        const content = await PuppeteerUtils.evalUiElement(page, "content")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(subscreen.width).toBe(content.width)
        expect(subscreen.left + subscreen.width).toBe(element.left + element.width)
    })
<commit_msg>Fix: test<commit_after>const puppeteer = require("puppeteer")
import PuppeteerUtils from "../PuppeteerUtils"

const TIMEOUT = 5000
const SIZE = 50

describe("Size", () => {
    let browser: any
    let page: any

    beforeAll(async () => {
        browser = await puppeteer.launch({
            ignoreHTTPSErrors: true,
            args: ["--no-sandbox", "--disable-setuid-sandbox", "--ignore-certificate-errors"],
        })
        page = await browser.newPage()
    }, TIMEOUT)

    afterAll(async (done: () => void) => {
        await page.close()
        await browser.close()
        done()
    })

    test("Width", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(element.width).toBe(SIZE)
    })

    test("Width full content", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width-full-content")

        const content = await PuppeteerUtils.evalUiElement(page, "content")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(element.width).toBe(content.width)
    })

    test("Width full with padding", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width-full-with-padding")

        const content = await PuppeteerUtils.evalUiElement(page, "content")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(element.width).toBe(content.width - 100)
    })

    test("Width full with right son", async () => {
        await PuppeteerUtils.loadPage(page, __dirname, "width-full-with-right-son")

        const subscreen = await PuppeteerUtils.evalUiElement(page, "subscreen")
        const content = await PuppeteerUtils.evalUiElement(page, "content")
        const element = await PuppeteerUtils.evalUiElement(page, "element")

        expect(subscreen.width).toBe(content.width)
        expect(subscreen.width).toBe(element.left + element.width)
    })

{'fraction_non_alphanumeric': 0.13202873420857072, 'fraction_numerical': 0.004458756502353232, 'mean_word_length': 3.017910447761194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1761373', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1193, 'n_words': 246}