Convert tests to ESM

GitOrigin-RevId: 03bd4db8cddc548706439edd7f6db0bc3e7ed9d3
This commit is contained in:
Andrew Rumble
2025-10-22 13:52:08 +01:00
committed by Copybot
parent 912324f560
commit 93b7274ea6
61 changed files with 8428 additions and 8063 deletions
@@ -1,14 +1,14 @@
const { expect } = require('chai')
const SandboxedModule = require('sandboxed-module')
const MODULE_PATH = require('path').join(
__dirname,
'../../../../app/src/Features/Helpers/SafeHTMLSubstitution.js'
import { beforeAll, describe, expect } from 'vitest'
import path from 'node:path'
const MODULE_PATH = path.join(
import.meta.dirname,
'../../../../app/src/Features/Helpers/SafeHTMLSubstitution.mjs'
)
describe('SafeHTMLSubstitution', function () {
let SafeHTMLSubstitution
before(function () {
SafeHTMLSubstitution = SandboxedModule.require(MODULE_PATH)
beforeAll(async function () {
SafeHTMLSubstitution = (await import(MODULE_PATH)).default
})
describe('SPLIT_REGEX', function () {