Skip to content

Commit bcebf57

Browse files
committed
test: Remove old integration tests
1 parent 7e76d7c commit bcebf57

154 files changed

Lines changed: 481 additions & 3333 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/checks.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -136,36 +136,6 @@ jobs:
136136
node-version: [18, 20, 22, 24]
137137
os: [ubuntu-latest, windows-latest]
138138
runs-on: ${{ matrix.os }}
139-
steps:
140-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
141-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
142-
with:
143-
node-version: ${{ matrix.node-version }}
144-
- name: Use dependency cache
145-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
146-
id: dependency-cache
147-
with:
148-
path: "**/node_modules"
149-
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }}
150-
- name: Install dependencies
151-
run: yarn --frozen-lockfile --ignore-engines
152-
if: steps.dependency-cache.outputs.cache-hit != 'true'
153-
- name: Download build artifacts
154-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
155-
with:
156-
name: dist-artifacts-${{ github.run_id }}
157-
path: packages
158-
- run: yarn test:integration
159-
160-
test-integration-next:
161-
needs: build
162-
name: "Integration Tests Next (Node ${{ matrix.node-version }}, OS ${{ matrix.os }})"
163-
strategy:
164-
fail-fast: false
165-
matrix:
166-
node-version: [18, 20, 22, 24]
167-
os: [ubuntu-latest, windows-latest]
168-
runs-on: ${{ matrix.os }}
169139
steps:
170140
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
171141
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
@@ -188,7 +158,7 @@ jobs:
188158
with:
189159
name: dist-artifacts-${{ github.run_id }}
190160
path: packages
191-
- run: yarn test:integration-next
161+
- run: yarn test:integration
192162

193163
lint:
194164
needs: build

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"packages/dev-utils",
1212
"packages/esbuild-plugin",
1313
"packages/eslint-configs",
14-
"packages/integration-tests",
1514
"packages/playground",
1615
"packages/rollup-plugin",
1716
"packages/tsconfigs",
@@ -28,9 +27,8 @@
2827
"clean": "nx run-many --target=clean --all",
2928
"clean:all": "nx run-many --target=clean:all --all && yarn",
3029
"test": "nx run-many --target=test --all",
31-
"test:unit": "nx run-many --target=test --all --exclude=@sentry-internal/integration-tests,@sentry-internal/integration-tests-next",
32-
"test:integration": "nx run @sentry-internal/integration-tests:test",
33-
"test:integration-next": "nx run @sentry-internal/integration-tests-next:test",
30+
"test:unit": "nx run-many --target=test --all --exclude=@sentry-internal/integration-tests-next",
31+
"test:integration": "nx run @sentry-internal/integration-tests-next:test",
3432
"lint": "nx run-many --target=lint --all",
3533
"check:formatting": "oxfmt --check .",
3634
"fix:formatting": "oxfmt ."

packages/babel-plugin-component-annotate/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
},
5252
"devDependencies": {
5353
"@babel/core": "7.18.5",
54+
"@types/babel__core": "^7.20.5",
5455
"@babel/preset-react": "^7.23.3",
5556
"@sentry-internal/eslint-config": "5.2.1",
5657
"@sentry-internal/sentry-bundler-plugin-tsconfig": "5.2.1",

packages/babel-plugin-component-annotate/src/experimental.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,13 @@ function processJSX(context: JSXProcessingContext, jsxNode: Babel.NodePath): voi
283283
// NOTE: I don't know of a case where `openingElement` would have more than one item,
284284
// but it's safer to always iterate
285285
const paths = jsxNode.get("openingElement");
286-
const openingElements = Array.isArray(paths) ? paths : [paths];
286+
const openingElements: Babel.NodePath<Babel.types.JSXOpeningElement>[] = Array.isArray(paths)
287+
? paths
288+
: [paths];
287289

288290
const hasInjectedAttributes = openingElements.reduce(
289291
(prev, openingElement) =>
290-
prev ||
291-
applyAttributes(
292-
context,
293-
openingElement as Babel.NodePath<Babel.types.JSXOpeningElement>,
294-
context.componentName
295-
),
292+
prev || applyAttributes(context, openingElement, context.componentName),
296293
false
297294
);
298295

packages/integration-tests-next/fixtures/esbuild/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function test(url: string, callback: TestCallback) {
3737
// Detect CJS config files by test name suffix
3838
const configExt = testName.endsWith("-cjs") ? ".config.cjs" : ".config.js";
3939

40-
vitestTest(`esbuild > ${testName}`, (ctx) =>
40+
vitestTest(`pnpm esbuild > ${testName}`, (ctx) =>
4141
callback({
4242
outDir,
4343
runBundler: (env) =>

packages/integration-tests-next/fixtures/rolldown/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function test(url: string, callback: TestCallback) {
3939
outDir,
4040
runBundler: (env) =>
4141
runBundler(
42-
`rolldown --config ${testName}${configExt}`,
42+
`pnpm rolldown --config ${testName}${configExt}`,
4343
{
4444
cwd,
4545
env: {

packages/integration-tests-next/fixtures/rollup3/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function test(url: string, callback: TestCallback) {
3333
outDir,
3434
runBundler: (env) =>
3535
runBundler(
36-
`rollup --config ${testName}${configExt}`,
36+
`pnpm rollup --config ${testName}${configExt}`,
3737
{
3838
cwd,
3939
env: {

packages/integration-tests-next/fixtures/rollup4/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function test(url: string, callback: TestCallback) {
3333
outDir,
3434
runBundler: (env) =>
3535
runBundler(
36-
`rollup --config ${testName}${configExt}`,
36+
`pnpm rollup --config ${testName}${configExt}`,
3737
{
3838
cwd,
3939
env: {

packages/integration-tests-next/fixtures/vite4/after-upload-deletion.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => {
55
runBundler();
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
8-
"basic.js": "!(function() {
8+
"basic.js": "!function() {
99
try {
1010
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
1111
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
1212
var n = new e.Error().stack;
1313
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000");
1414
} catch (e2) {
1515
}
16-
})();
16+
}();
1717
console.log("hello world");
1818
//# sourceMappingURL=basic.js.map
1919
",

packages/integration-tests-next/fixtures/vite4/application-key.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
55
runBundler();
66
expect(readOutputFiles()).toMatchInlineSnapshot(`
77
{
8-
"basic.js": "!(function() {
8+
"basic.js": "!function() {
99
try {
1010
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
1111
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
12-
e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = (function(e2) {
12+
e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e2) {
1313
for (var n2 = 1; n2 < arguments.length; n2++) {
1414
var a = arguments[n2];
15-
if (null != a) for (var t in a) a.hasOwnProperty(t) && (e2[t] = a[t]);
15+
if (null != a)
16+
for (var t in a)
17+
a.hasOwnProperty(t) && (e2[t] = a[t]);
1618
}
1719
return e2;
18-
})({}, e._sentryModuleMetadata[new e.Error().stack], { "_sentryBundlerPluginAppKey:1234567890abcdef": true });
20+
}({}, e._sentryModuleMetadata[new e.Error().stack], { "_sentryBundlerPluginAppKey:1234567890abcdef": true });
1921
var n = new e.Error().stack;
2022
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000");
2123
} catch (e2) {
2224
}
23-
})();
25+
}();
2426
console.log("hello world");
2527
",
2628
}

0 commit comments

Comments
 (0)