Convert test files to ESM (batch 4): pads-with-spaces, largePaste, regression-db, lowerCasePadIds

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

View file

@ -1,7 +1,12 @@
'use strict';
const assert = require('assert').strict;
const common = require('../common');
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import assert from 'assert';
import common from '../common.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
let agent: any;
let apiVersion = 1;

View file

@ -1,9 +1,14 @@
'use strict';
const assert = require('assert').strict;
const common = require('../common');
const padManager = require('../../../node/db/PadManager');
import settings from '../../../node/utils/Settings';
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import assert from 'assert';
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,6 +1,11 @@
'use strict';
const common = require('../common');
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import common from '../common.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
let agent:any;

View file

@ -1,9 +1,16 @@
'use strict';
const AuthorManager = require('../../../node/db/AuthorManager');
import {fileURLToPath} from 'node:url';
import {dirname} from 'node:path';
import authorManager from '../../../node/db/AuthorManager.js';
import {strict as assert} from "assert";
const common = require('../common');
const db = require('../../../node/db/DB');
import common from '../common.js';
import db from '../../../node/db/DB.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const AuthorManager = authorManager;
describe(__filename, function () {
let setBackup: Function;