Fix is.class for minified class expression (#217)
This commit is contained in:
parent
d22ab62991
commit
e7c84fcb79
2 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue