diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8643/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8643/output.js index 77bd2e581726..2383456174bf 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/8643/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8643/output.js @@ -8,6 +8,12 @@ const Cache = { get: function(key) { if (!1 !== this.enabled) // console.log( 'THREE.Cache', 'Checking key:', key ); return this.files[key]; + }, + remove: function(key) { + delete this.files[key]; + }, + clear: function() { + this.files = {}; } }; class Loader { diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9148/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/9148/output.js new file mode 100644 index 000000000000..9c6db76fcaaa --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9148/output.js @@ -0,0 +1,14 @@ +export default (function() { + const obj = { + clear: function() { + console.log('clear'); + }, + start: function() { + const _this = this; + setTimeout(function() { + _this.clear(); + }); + } + }; + return ()=>obj.start(); +})(); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/hoist_props/contains_this_1/output.js b/crates/swc_ecma_minifier/tests/terser/compress/hoist_props/contains_this_1/output.js index 76f60763a8db..ca168451f516 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/hoist_props/contains_this_1/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/hoist_props/contains_this_1/output.js @@ -1 +1,7 @@ -console.log(1, 1); +var o = { + u: function() { + return this === this; + }, + p: 1 +}; +console.log(o.p, o.p);