mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-23 18:17:14 +00:00
Convert test files to ESM (batch 5 - final): i18n, settings, hooks, webaccess, undo_clear_authorship, specialpages, socketio
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
37f082e413
commit
e6ee5ee72d
7 changed files with 67 additions and 25 deletions
|
|
@ -1,11 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
import {strict as assert} from 'assert';
|
||||
const hooks = require('../../../static/js/pluginfw/hooks');
|
||||
const plugins = require('../../../static/js/pluginfw/plugin_defs');
|
||||
import hooks from '../../../static/js/pluginfw/hooks.js';
|
||||
import pluginDefs from '../../../static/js/pluginfw/plugin_defs.js';
|
||||
import sinon from 'sinon';
|
||||
import {MapArrayType} from "../../../node/types/MapType";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
const plugins = pluginDefs;
|
||||
|
||||
|
||||
interface ExtendedConsole extends Console {
|
||||
warn: {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
const assert = require('assert').strict;
|
||||
const common = require('../common');
|
||||
const i18n = require('../../../node/hooks/i18n');
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
import assert from 'assert';
|
||||
import common from '../common.js';
|
||||
import i18n from '../../../node/hooks/i18n.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
describe(__filename, function () {
|
||||
before(async function () {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
const assert = require('assert').strict;
|
||||
import {exportedForTestingOnly} from '../../../node/utils/Settings'
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
import assert from 'assert';
|
||||
import {exportedForTestingOnly} from '../../../node/utils/Settings.js'
|
||||
import path from 'path';
|
||||
import process from 'process';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
describe(__filename, function () {
|
||||
describe('parseSettings', function () {
|
||||
let settings: any;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
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 settings from '../../../node/utils/Settings';
|
||||
const socketIoRouter = require('../../../node/handler/SocketIORouter');
|
||||
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';
|
||||
import settings from '../../../node/utils/Settings.js';
|
||||
import socketIoRouter from '../../../node/handler/SocketIORouter.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
const plugins = pluginDefs;
|
||||
|
||||
describe(__filename, function () {
|
||||
this.timeout(30000);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
import {strict as assert} from 'assert';
|
||||
import {MapArrayType} from "../../../node/types/MapType";
|
||||
|
||||
const common = require('../common');
|
||||
import settings from '../../../node/utils/Settings';
|
||||
import common from '../common.js';
|
||||
import settings from '../../../node/utils/Settings.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
|
||||
/**
|
||||
* Tests for https://github.com/ether/etherpad-lite/issues/2802
|
||||
*
|
||||
|
|
@ -13,11 +16,14 @@
|
|||
|
||||
import {PadType} from "../../../node/types/PadType";
|
||||
|
||||
const assert = require('assert').strict;
|
||||
const common = require('../common');
|
||||
const padManager = require('../../../node/db/PadManager');
|
||||
import AttributePool from '../../../static/js/AttributePool';
|
||||
import padutils from '../../../static/js/pad_utils';
|
||||
import assert from 'assert';
|
||||
import common from '../common.js';
|
||||
import padManager from '../../../node/db/PadManager.js';
|
||||
import AttributePool from '../../../static/js/AttributePool.js';
|
||||
import padutils from '../../../static/js/pad_utils.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
describe(__filename, function () {
|
||||
let agent: any;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {dirname} from 'node:path';
|
||||
import {MapArrayType} from "../../../node/types/MapType";
|
||||
import {Func} from "mocha";
|
||||
import {SettingsUser} from "../../../node/types/SettingsUser";
|
||||
|
||||
const assert = require('assert').strict;
|
||||
const common = require('../common');
|
||||
const plugins = require('../../../static/js/pluginfw/plugin_defs');
|
||||
import settings from '../../../node/utils/Settings';
|
||||
import assert from 'assert';
|
||||
import common from '../common.js';
|
||||
import pluginDefs from '../../../static/js/pluginfw/plugin_defs.js';
|
||||
import settings from '../../../node/utils/Settings.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
const plugins = pluginDefs;
|
||||
|
||||
describe(__filename, function () {
|
||||
this.timeout(30000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue