Skip to content

Commit

Permalink
fix: fixed tests and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Nov 5, 2023
1 parent b1d62b8 commit e983415
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
23 changes: 13 additions & 10 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
import classNames from 'classnames';
import { withThemeByDataAttribute } from '@storybook/addon-themes';
import { NextIntlClientProvider } from 'next-intl';
import { NotificationProvider } from '../providers/notificationProvider';
import * as constants from './constants';

import { withThemeByDataAttribute } from '@storybook/addon-themes';
import { NotificationProvider } from '@/providers/notificationProvider';
import {
OPEN_SANS_FONT,
IBM_PLEX_MONO_FONT,
STORYBOOK_MODES,
STORYBOOK_SIZES,
} from '@/.storybook/constants';
import type { Preview, ReactRenderer } from '@storybook/react';

import englishLocale from '@/i18n/locales/en.json';

import '../styles/new/index.css';

const rootClasses = classNames(
constants.OPEN_SANS_FONT.variable,
constants.IBM_PLEX_MONO_FONT.variable,
OPEN_SANS_FONT.variable,
IBM_PLEX_MONO_FONT.variable,
'font-open-sans'
);

const preview: Preview = {
parameters: {
nextjs: { router: { basePath: '' } },
chromatic: { modes: constants.STORYBOOK_MODES },
viewport: {
defaultViewport: 'large',
viewports: constants.STORYBOOK_SIZES,
},
chromatic: { modes: STORYBOOK_MODES },
viewport: { defaultViewport: 'large', viewports: STORYBOOK_SIZES },
},
// These are extra Storybook Decorators applied to all stories
// that introduce extra functionality such as Theme Switching
Expand Down
2 changes: 1 addition & 1 deletion components/Containers/Footer/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

import Footer from './index';
import Footer from '@/components/Containers/Footer';

type Story = StoryObj<typeof Footer>;
type Meta = MetaObj<typeof Footer>;
Expand Down
2 changes: 1 addition & 1 deletion components/Containers/NavItem/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

import NavItem from './index';
import NavItem from '@/components/Containers/NavItem';

type Story = StoryObj<typeof NavItem>;
type Meta = MetaObj<typeof NavItem>;
Expand Down
3 changes: 1 addition & 2 deletions components/Downloads/SecondaryDownloadMatrix.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

import type { FC } from 'react';

import DownloadList from '@/components/Downloads/DownloadList';
import { WithNodeRelease } from '@/components/withNodeRelease';
import { useMatter } from '@/hooks/useMatter';
import { DIST_URL } from '@/next.constants.mjs';
import type { LegacyDownloadsFrontMatter, NodeRelease } from '@/types';

import DownloadList from './DownloadList';

// @TODO: Instead of using a static list it should be created dynamically. This is done on `nodejs.dev`
// since this is a temporary solution and going to be fixed in the future.
const SecondaryDownloadMatrix: FC<NodeRelease> = ({
Expand Down
2 changes: 1 addition & 1 deletion middleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createMiddleware from 'next-intl/middleware';

import { availableLocaleCodes, defaultLocale } from './next.locales.mjs';
import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs';

export default createMiddleware({
// A list of all locales that are supported
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('downloadUrlByOS', () => {
it('returns the default download URL for other operating systems', () => {
const os = 'OTHER';
const bitness = 86;
const expectedUrl = 'https://nodejs.org/dist/v18.16.0/node-v18.16.0.tar.gz';
const expectedUrl = 'https://nodejs.org/dist/v18.16.0/node-v18.16.0.tar.xz';

expect(downloadUrlByOS(version, os, bitness)).toBe(expectedUrl);
});
Expand Down
File renamed without changes.

0 comments on commit e983415

Please sign in to comment.