Skip to content

Commit

Permalink
remove conditional test stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Dec 18, 2024
1 parent 80d832f commit 513e42d
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 59 deletions.
2 changes: 1 addition & 1 deletion dev-packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build:types": "tsc -p tsconfig.types.json",
"clean": "rimraf -g **/node_modules && run-p clean:script",
"clean:script": "node scripts/clean.js",
"prisma:init": "(cd suites/tracing/prisma-orm && ts-node ./setup.ts)",
"prisma:init": "cd suites/tracing/prisma-orm && yarn && yarn setup",
"lint": "eslint . --format stylish",
"fix": "eslint . --format stylish --fix",
"type-check": "tsc",
Expand Down
3 changes: 1 addition & 2 deletions dev-packages/node-integration-tests/suites/anr/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Event } from '@sentry/core';
import { conditionalTest } from '../../utils';
import { cleanupChildProcesses, createRunner } from '../../utils/runner';

const ANR_EVENT = {
Expand Down Expand Up @@ -107,7 +106,7 @@ const ANR_EVENT_WITH_DEBUG_META: Event = {
},
};

conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => {
describe('should report ANR when event loop blocked', () => {
afterAll(() => {
cleanupChildProcesses();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { join } from 'path';
import { conditionalTest } from '../../utils';
import { createRunner } from '../../utils/runner';

conditionalTest({ min: 18 })('ContextLines integration in ESM', () => {
describe('ContextLines integration in ESM', () => {
test('reads encoded context lines from filenames with spaces', done => {
expect.assertions(1);
const instrumentPath = join(__dirname, 'instrument.mjs');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { spawnSync } from 'child_process';
import { join } from 'path';
import { conditionalTest } from '../../../utils';
import { cleanupChildProcesses } from '../../../utils/runner';

afterAll(() => {
cleanupChildProcesses();
});

conditionalTest({ min: 18 })('import-in-the-middle', () => {
describe('import-in-the-middle', () => {
test('onlyIncludeInstrumentedModules', () => {
const result = spawnSync('node', [join(__dirname, 'app.mjs')], { encoding: 'utf-8' });
expect(result.stderr).not.toMatch('should be the only hooked modules but we just hooked');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { conditionalTest } from '../../../utils';
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';

afterAll(() => {
cleanupChildProcesses();
});

conditionalTest({ min: 18 })('modulesIntegration', () => {
describe('modulesIntegration', () => {
test('does not crash ESM setups', done => {
createRunner(__dirname, 'app.mjs').ensureNoErrorOutput().start(done);
});
Expand Down
3 changes: 1 addition & 2 deletions dev-packages/node-integration-tests/suites/no-code/test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { conditionalTest } from '../../utils';
import { cleanupChildProcesses, createRunner } from '../../utils/runner';

const EVENT = {
Expand All @@ -25,7 +24,7 @@ describe('no-code init', () => {
.start(done);
});

conditionalTest({ min: 18 })('--import', () => {
describe('--import', () => {
test('ESM', done => {
createRunner(__dirname, 'app.mjs')
.withFlags('--import=@sentry/node/init')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const EXPECTED_LOCAL_VARIABLES_EVENT = {
},
};

conditionalTest({ min: 18 })('LocalVariables integration', () => {
describe('LocalVariables integration', () => {
afterAll(() => {
cleanupChildProcesses();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { conditionalTest } from '../../../utils';
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';

// `ai` SDK only support Node 18+
conditionalTest({ min: 18 })('ai', () => {
describe('ai', () => {
afterAll(() => {
cleanupChildProcesses();
});
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { conditionalTest } from '../../../utils';
import { createRunner } from '../../../utils/runner';

conditionalTest({ min: 16 })('Prisma ORM Tests', () => {
describe('Prisma ORM Tests', () => {
test('CJS - should instrument PostgreSQL queries from Prisma ORM', done => {
const EXPECTED_TRANSACTION = {
transaction: 'Test Transaction',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { conditionalTest } from '../../../../utils';
import { createRunner } from '../../../../utils/runner';
import { createTestServer } from '../../../../utils/server';

conditionalTest({ min: 18 })('outgoing fetch', () => {
describe('outgoing fetch', () => {
test('outgoing fetch requests create breadcrumbs', done => {
createTestServer(done)
.start()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { conditionalTest } from '../../../../utils';
import { createRunner } from '../../../../utils/runner';
import { createTestServer } from '../../../../utils/server';

conditionalTest({ min: 18 })('outgoing fetch', () => {
describe('outgoing fetch', () => {
test('outgoing fetch requests are correctly instrumented with tracing disabled', done => {
expect.assertions(11);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { conditionalTest } from '../../../../utils';
import { createRunner } from '../../../../utils/runner';
import { createTestServer } from '../../../../utils/server';

conditionalTest({ min: 18 })('outgoing fetch', () => {
describe('outgoing fetch', () => {
test('outgoing sampled fetch requests without active span are correctly instrumented', done => {
expect.assertions(11);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { conditionalTest } from '../../../../utils';
import { createRunner } from '../../../../utils/runner';
import { createTestServer } from '../../../../utils/server';

conditionalTest({ min: 18 })('outgoing fetch', () => {
describe('outgoing fetch', () => {
test('outgoing fetch requests are correctly instrumented when not sampled', done => {
expect.assertions(11);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { join } from 'path';
import { conditionalTest } from '../../../../utils';
import { createRunner } from '../../../../utils/runner';
import { createTestServer } from '../../../../utils/server';

conditionalTest({ min: 18 })('outgoing http in ESM', () => {
describe('outgoing http in ESM', () => {
test('outgoing sampled http requests are correctly instrumented in ESM', done => {
expect.assertions(11);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { conditionalTest } from '../../../utils';
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';

jest.setTimeout(75000);

// Tedious version we are testing against only supports Node 18+
// https://github.com/tediousjs/tedious/blob/8310c455a2cc1cba83c1ca3c16677da4f83e12a9/package.json#L38
conditionalTest({ min: 18 })('tedious auto instrumentation', () => {
describe('tedious auto instrumentation', () => {
afterAll(() => {
cleanupChildProcesses();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/test/types/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "This is used to install the nextjs v12 so we can test against those types",
"scripts": {
"test": "ts-node test.ts"
"test": "yarn && yarn tsc --noEmit --project tsconfig.json"
},
"dependencies": {
"next": "13.2.0"
Expand Down
12 changes: 0 additions & 12 deletions packages/nextjs/test/types/test.ts

This file was deleted.

0 comments on commit 513e42d

Please sign in to comment.