diff options
author | 2023-06-05 23:12:18 -0700 | |
---|---|---|
committer | 2023-06-05 23:12:18 -0700 | |
commit | 6a31893ce5bc8a0d4a3e8a7d6412b69644ab003c (patch) | |
tree | 4d11a20192280ae29a6ec740abf2b8108baf503e /test/bundler/bundler_npm.test.ts | |
parent | ec71e7afe49d5110f3c9d0eba8e49ea22a549e41 (diff) | |
download | bun-dylan/fix-bundling-lodash-es-is-buffer.tar.gz bun-dylan/fix-bundling-lodash-es-is-buffer.tar.zst bun-dylan/fix-bundling-lodash-es-is-buffer.zip |
only if assign target is none, tests for cjs/esm bundlingdylan/fix-bundling-lodash-es-is-buffer
Diffstat (limited to 'test/bundler/bundler_npm.test.ts')
-rw-r--r-- | test/bundler/bundler_npm.test.ts | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/bundler/bundler_npm.test.ts b/test/bundler/bundler_npm.test.ts index 327d68087..1a62126a1 100644 --- a/test/bundler/bundler_npm.test.ts +++ b/test/bundler/bundler_npm.test.ts @@ -68,4 +68,53 @@ describe("bundler", () => { stdout: "pass", }, }); + itBundled("npm/LodashEsmImportEsmExport", { + files: { + "/entry.js": /* js */ ` + import { isEqual, uniq } from "lodash-es" + console.log(isEqual({a: 1}, {a: 1})) + `, + }, + install: ["lodash-es"], + run: { + stdout: "true", + }, + }); + itBundled("npm/LodashEsmImportCjsExport", { + files: { + "/entry.js": /* js */ ` + import { isEqual, uniq } from "lodash" + console.log(isEqual({a: 1}, {a: 1})) + `, + }, + install: ["lodash"], + run: { + stdout: "true", + }, + }); + itBundled("npm/LodashCjsImportCjsExport", { + files: { + "/entry.js": /* js */ ` + const { isEqual, uniq } = require("lodash"); + console.log(isEqual({a: 1}, {a: 1})) + `, + }, + install: ["lodash"], + run: { + stdout: "true", + }, + }); + itBundled("npm/LodashCjsImportEsmExport", { + todo: true, + files: { + "/entry.js": /* js */ ` + const { isEqual, uniq } = require("lodash-es"); + console.log(isEqual({a: 1}, {a: 1})) + `, + }, + install: ["lodash-es"], + run: { + stdout: "true", + }, + }); }); |