-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathbasic-sourcemaps.test.ts
More file actions
28 lines (25 loc) · 1.55 KB
/
basic-sourcemaps.test.ts
File metadata and controls
28 lines (25 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { expect } from "vitest";
import { test } from "./utils";
test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="33730b8e-5b8d-4795-94b2-666cea28fce6",e._sentryDebugIdIdentifier="sentry-dbid-33730b8e-5b8d-4795-94b2-666cea28fce6");}catch(e){}}();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// eslint-disable-next-line no-console
console.log("hello world");
/******/ })()
;
//# sourceMappingURL=basic.js.map",
"basic.js.map": "{"version":3,"file":"basic.js","mappings":";;;AAAA;AACA","sources":["webpack://rollup4-integration-tests/./src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"names":[],"sourceRoot":""}",
"sentry-cli-mock.json": "["releases","new","CURRENT_SHA"],
["releases","set-commits","CURRENT_SHA","--auto","--ignore-missing"],
["releases","finalize","CURRENT_SHA"],
["sourcemaps","upload","-p","fake-project","--release","CURRENT_SHA","sentry-bundler-plugin-upload-path","--ignore","node_modules","--no-rewrite"],
",
}
`);
const output = runFileInNode("basic.js");
expect(output).toBe("hello world\n");
});