Skip to content

Commit

Permalink
refactor: 628 - remove unused env variables (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quiddlee authored Nov 4, 2024
1 parent dfa0b38 commit 1f70018
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .env

This file was deleted.

3 changes: 0 additions & 3 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export const TABLET_W = Number(process.env.NEXT_PUBLIC_TABLET);
export const MOBILE_W = Number(process.env.NEXT_PUBLIC_MOBILE);
export const DESKTOP_W = 1280;
export const RS_INTRO_URL = 'https://www.youtube.com/embed/n4unZLVpnaU';
export const RS_FOUNDATION_YEAR = '2013';

Expand Down
9 changes: 0 additions & 9 deletions src/shared/helpers/generateSizes.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/shared/helpers/generateSrcSet.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/widgets/about-video/ui/about-video.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ describe('AboutVideo component', () => {
});

it('renders the placeholder in development mode', () => {
vi.stubEnv('NEXT_PUBLIC_DEV', 'true');
vi.stubEnv('NODE_ENV', 'development');
render(<AboutVideo />);
const placeholder = screen.getByText('Video Placeholder');

expect(placeholder).toBeVisible();
});

it('renders the YouTube embed in production mode', () => {
vi.stubEnv('NEXT_PUBLIC_DEV', 'false');
vi.stubEnv('NODE_ENV', 'production');
render(<AboutVideo />);
const video = screen.getByTitle('Introduction to The Rolling Scopes School Online Courses');

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/about-video/ui/about-video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type AboutVideoProps = { lang?: 'en' | 'ru' };

export const AboutVideo = ({ lang = 'en' }: AboutVideoProps) => {
// Needed to prevent flakiness in screenshot tests
const isRunningInDev = process.env.NEXT_PUBLIC_DEV === 'true';
const isRunningInDev = process.env.NODE_ENV === 'development';

return (
<section className={cx('container')} data-testid="about-video">
Expand Down

0 comments on commit 1f70018

Please sign in to comment.