diff options
author | 2021-09-23 22:01:34 -0700 | |
---|---|---|
committer | 2021-09-23 22:01:34 -0700 | |
commit | 4bb41b95a826892107b7ff3ff610d23d5afa96b6 (patch) | |
tree | 439f273d09ae8fa845eaec24c9e436c8fd244be3 /integration/snippets/code-simplification-neql-define.js | |
parent | f78f4854a4e474a08023841f4714f0cd3774126b (diff) | |
download | bun-4bb41b95a826892107b7ff3ff610d23d5afa96b6.tar.gz bun-4bb41b95a826892107b7ff3ff610d23d5afa96b6.tar.zst bun-4bb41b95a826892107b7ff3ff610d23d5afa96b6.zip |
:camera:
Diffstat (limited to 'integration/snippets/code-simplification-neql-define.js')
-rw-r--r-- | integration/snippets/code-simplification-neql-define.js | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/integration/snippets/code-simplification-neql-define.js b/integration/snippets/code-simplification-neql-define.js new file mode 100644 index 000000000..ed5c5c395 --- /dev/null +++ b/integration/snippets/code-simplification-neql-define.js @@ -0,0 +1,56 @@ +var testFailed = false; +const invariant = () => { + testFailed = true; +}; +var $$m = (arg) => { + var module = { exports: {} }, + exports = module.exports; + return arg(module, exports); +}; +var size = 100, + ttl = 3600; + +export var $f332019d = $$m( + { + "relay-runtime/lib/network/RelayQueryResponseCache.js": ( + module, + exports + ) => { + var RelayQueryResponseCache = function () { + var foo = function RelayQueryResponseCache(_ref) { + var size = _ref.size, + ttl = _ref.ttl; + !(size > 0) + ? process.env.NODE_ENV !== "production" + ? invariant( + false, + "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + + "`%s`.", + size + ) + : invariant(false) + : void 0; + !(ttl > 0) + ? process.env.NODE_ENV !== "production" + ? invariant( + false, + "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", + ttl + ) + : invariant(false) + : void 0; + }; + foo({ size: 100, ttl: 3600 }); + }; + RelayQueryResponseCache(); + }, + }["relay-runtime/lib/network/RelayQueryResponseCache.js"] +); + +export function test() { + var foo = () => result; + // $f332019d; + + if (testFailed) throw new Error("invariant should not be called"); + return testDone(import.meta.url); +} |