-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(esbuild): Don't inject debug IDs into injected modules
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/integration-tests/fixtures/esbuild-inject-compat/esbuild-inject-compat.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import childProcess from "child_process"; | ||
import path from "path"; | ||
import fs from "fs"; | ||
|
||
const outputBundlePath = path.join(__dirname, "out", "index.js"); | ||
|
||
test("check functionality", () => { | ||
const processOutput = childProcess.execSync(`node ${outputBundlePath}`, { encoding: "utf-8" }); | ||
expect(processOutput).toMatch(/injected fallback/); | ||
}); | ||
|
||
test("check that output only contains one debug ID reference", async () => { | ||
const bundleContent = await fs.promises.readFile(outputBundlePath, "utf-8"); | ||
const debugIdReferences = bundleContent.match(/sentry-dbid-/g) ?? []; | ||
expect(debugIdReferences).toHaveLength(1); | ||
}); |