Skip to content

Conversation

@onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Jan 18, 2022

To have a common alias for both assertions and subjects, I added the alias to:

1 - Webpack config (for browser-related utils in subject.js files)
2 - TypeScript config (for assertion utils in test.ts files)
3 - ESLint config (To prevent false positives from import/no-undefined rule)

Also updated playwright and @playwright/test to 1.18.0-rc1 to be able to use aliases defined in tsconfig.json: https://github.com/microsoft/playwright/releases/tag/v1.18.0-rc1

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2022

size-limit report

Path Base Size (09cc3af) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.63 KB 19.63 KB +0.01% 🔺
@sentry/browser - CDN Bundle (minified) 62.5 KB 62.51 KB +0.01% 🔺
@sentry/browser - Webpack 22.16 KB 22.16 KB 0%
@sentry/browser - Webpack - gzip = false 75.66 KB 75.66 KB 0%
@sentry/react - Webpack 22.2 KB 22.2 KB 0%
@sentry/nextjs Client - Webpack 46.41 KB 46.41 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.35 KB 28.36 KB +0.01% 🔺

@onurtemizkan onurtemizkan force-pushed the onur/int-tests-utils-alias branch from ed0a8d8 to 3688e09 Compare January 18, 2022 13:20
import { sentryTest } from '../../../../utils/fixtures';
import { getSentryRequest } from '../../../../utils/helpers';
import { sentryTest } from '@utils/fixtures';
import { getSentryRequest } from '@utils/helpers';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I don't see the value in the relative import here, it just makes things more confusing. Any thoughts?

Copy link
Collaborator Author

@onurtemizkan onurtemizkan Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, actually I thought so. But as we're introducing this alias for subjects, it seemed less confusing to have the same behaviour on the assertions. I'm totally fine with removing aliases for assertions. It requires too much custom configuration anyways.

@onurtemizkan
Copy link
Collaborator Author

Closing as we decided to keep it simple and avoid using internal aliases.

@onurtemizkan onurtemizkan deleted the onur/int-tests-utils-alias branch January 19, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants