From 208e584d39ee3727691921c9541a55ba5108d711 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 12 Jan 2021 11:52:50 -0600 Subject: [PATCH] test: rename_and_inline --- test/compress/toplevel-pure-method.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/compress/toplevel-pure-method.js b/test/compress/toplevel-pure-method.js index c0d36dd4e..cf805c9fc 100644 --- a/test/compress/toplevel-pure-method.js +++ b/test/compress/toplevel-pure-method.js @@ -45,3 +45,27 @@ inline_different_name: { } } +// TODO: +rename_and_inline: { + options = { + toplevel: true, + defaults: true, + pure_getters: true + } + input: { + class MyClass { + method(a) { + myPureFunction(a) + } + } + + function myPureFunction (a) { + console.log(a) + } + + new MyClass(); + } + expect: { + new class{method(a) {console.log(a)}}; + } +}