mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 06:39:02 +02:00
Convert tests to ESM
GitOrigin-RevId: 03bd4db8cddc548706439edd7f6db0bc3e7ed9d3
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user