Convert test files to ESM (batch 3): export, clientvar_rev_consistency, sanitizePluginsForWire, messages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
SamTV12345 2026-04-26 14:06:12 +02:00
parent fcfd7c42a0
commit 53cde306d6
4 changed files with 40 additions and 15 deletions

View file

@ -1,5 +1,8 @@
'use strict';
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
/**
* Regression test for https://github.com/ether/etherpad-lite/issues/4040
*
@ -13,12 +16,17 @@
* production failures were observed.
*/
const assert = require('assert').strict;
const common = require('../common');
const padManager = require('../../../node/db/PadManager');
const plugins = require('../../../static/js/pluginfw/plugin_defs');
const settings = require('../../../node/utils/Settings');
import {randomString} from '../../../static/js/pad_utils';
import assert from 'assert';
import common from '../common.js';
import padManager from '../../../node/db/PadManager.js';
import pluginDefs from '../../../static/js/pluginfw/plugin_defs.js';
import settings from '../../../node/utils/Settings.js';
import {randomString} from '../../../static/js/pad_utils.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const plugins = pluginDefs;
describe(__filename, function () {
let agent: any;

View file

@ -1,10 +1,15 @@
'use strict';
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import {MapArrayType} from "../../../node/types/MapType";
const common = require('../common');
const padManager = require('../../../node/db/PadManager');
import settings from '../../../node/utils/Settings';
import common from '../common.js';
import padManager from '../../../node/db/PadManager.js';
import settings from '../../../node/utils/Settings.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
describe(__filename, function () {
let agent:any;

View file

@ -1,13 +1,20 @@
'use strict';
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import {PadType} from "../../../node/types/PadType";
import {MapArrayType} from "../../../node/types/MapType";
const assert = require('assert').strict;
const common = require('../common');
const padManager = require('../../../node/db/PadManager');
const plugins = require('../../../static/js/pluginfw/plugin_defs');
import readOnlyManager from '../../../node/db/ReadOnlyManager';
import assert from 'assert';
import common from '../common.js';
import padManager from '../../../node/db/PadManager.js';
import pluginDefs from '../../../static/js/pluginfw/plugin_defs.js';
import readOnlyManager from '../../../node/db/ReadOnlyManager.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const plugins = pluginDefs;
describe(__filename, function () {
let agent:any;

View file

@ -1,7 +1,12 @@
'use strict';
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import {strict as assert} from 'assert';
const {sanitizePluginsForWire} = require('../../../node/handler/PadMessageHandler');
import {sanitizePluginsForWire} from '../../../node/handler/PadMessageHandler.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
describe(__filename, function () {
const makeRegistry = () => ({