aboutsummaryrefslogtreecommitdiff
path: root/integration/snapshots-no-hmr/lodash-regexp.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-17 16:22:53 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-17 16:22:53 -0700
commit37701028431aea874d0fae44b56642bc83ec01ac (patch)
tree61953ba790d35d02c2591ec2a8da8d3820adcddc /integration/snapshots-no-hmr/lodash-regexp.js
parentcf7c80d42d8c040dcc01de8fe74f93f1866cbc41 (diff)
downloadbun-37701028431aea874d0fae44b56642bc83ec01ac.tar.gz
bun-37701028431aea874d0fae44b56642bc83ec01ac.tar.zst
bun-37701028431aea874d0fae44b56642bc83ec01ac.zip
Snapshots
Diffstat (limited to 'integration/snapshots-no-hmr/lodash-regexp.js')
-rw-r--r--integration/snapshots-no-hmr/lodash-regexp.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/integration/snapshots-no-hmr/lodash-regexp.js b/integration/snapshots-no-hmr/lodash-regexp.js
new file mode 100644
index 000000000..6e0e6190a
--- /dev/null
+++ b/integration/snapshots-no-hmr/lodash-regexp.js
@@ -0,0 +1,21 @@
+import {
+__require as require
+} from "http://localhost:8080/__runtime.js";
+import * as $60f52dc2 from "http://localhost:8080/node_modules/lodash/lodash.js";
+var { shuffle} = require($60f52dc2);
+export function test() {
+ const foo = [1, 2, 3, 4, 6];
+
+ const bar = shuffle(foo);
+ console.assert(bar !== foo);
+ console.assert(bar.length === foo.length);
+ bar.sort();
+ foo.sort();
+ for (let i = 0;i < bar.length; i++) {
+ console.assert(bar[i] === foo[i], "expected " + i + " to be " + foo[i]);
+ console.assert(typeof bar[i] === "number");
+ console.assert(typeof foo[i] === "number");
+ }
+ return testDone(import.meta.url);
+}
+