remove test-node.js, use Function constructor to preserve whitespace

This commit is contained in:
Tim Griesser 2025-10-31 11:04:37 -04:00
parent e5991b561e
commit b2aad37462
4 changed files with 6 additions and 17 deletions

View file

@ -1086,9 +1086,13 @@ test('is.asyncIterable', t => {
test('is.class', t => {
class Foo {} // eslint-disable-line @typescript-eslint/no-extraneous-class
// Note: Using new Function to prevent whitespace modifications in tsimp
const minifiedClass = new Function('return class{};'); // eslint-disable-line no-new-func
const classDeclarations = [
Foo,
class Bar extends Foo {},
minifiedClass(),
];
for (const classDeclaration of classDeclarations) {