mirror of
https://github.com/ajnart/homarr.git
synced 2025-10-30 18:15:56 +01:00
♻️ Pull request comments
This commit is contained in:
@@ -105,6 +105,9 @@ Homarr uses [GitMoji](https://gitmoji.dev/).
|
|||||||
We would appreciate it if everyone keeps their commit messages withing these rulings.
|
We would appreciate it if everyone keeps their commit messages withing these rulings.
|
||||||
|
|
||||||
### Tests
|
### Tests
|
||||||
|
|
||||||
|
> Components should be tested using unit tests. A unit is the smallest isolated part of the component. Unit tests must not have any dependencies and must be isolated.
|
||||||
|
|
||||||
- Place testfiles directly at the root of the unit
|
- Place testfiles directly at the root of the unit
|
||||||
- Only test a single unit of work inside a unit test
|
- Only test a single unit of work inside a unit test
|
||||||
- You may test multiple units inside one test file
|
- You may test multiple units inside one test file
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
// https://www.i18next.com/overview/configuration-options#logging
|
||||||
i18n: {
|
i18n: {
|
||||||
defaultLocale: 'en',
|
defaultLocale: 'en',
|
||||||
locales: [
|
locales: [
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ module.exports = withBundleAnalyzer({
|
|||||||
},
|
},
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
i18n: i18n,
|
i18n,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -207,6 +207,9 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated legacy code
|
||||||
|
*/
|
||||||
function tryMatchType(imageName: string): ServiceType {
|
function tryMatchType(imageName: string): ServiceType {
|
||||||
const match = MatchingImages.find(({ image }) => imageName.includes(image));
|
const match = MatchingImages.find(({ image }) => imageName.includes(image));
|
||||||
if (match) {
|
if (match) {
|
||||||
@@ -216,6 +219,11 @@ function tryMatchType(imageName: string): ServiceType {
|
|||||||
return 'Other';
|
return 'Other';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @param container the container to match
|
||||||
|
* @returns a new service
|
||||||
|
*/
|
||||||
const tryMatchService = (container: Dockerode.ContainerInfo | undefined) => {
|
const tryMatchService = (container: Dockerode.ContainerInfo | undefined) => {
|
||||||
if (container === undefined) return {};
|
if (container === undefined) return {};
|
||||||
const name = container.Names[0].substring(1);
|
const name = container.Names[0].substring(1);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { MantineTheme } from '@mantine/core';
|
import { MantineTheme } from '@mantine/core';
|
||||||
|
|
||||||
import { OptionValues } from '../modules/ModuleTypes';
|
import { OptionValues } from '../modules/ModuleTypes';
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
@@ -74,6 +75,12 @@ export type ServiceType =
|
|||||||
| 'Sabnzbd'
|
| 'Sabnzbd'
|
||||||
| 'NZBGet';
|
| 'NZBGet';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @param name the name to match
|
||||||
|
* @param form the form
|
||||||
|
* @returns the port from the map
|
||||||
|
*/
|
||||||
export function tryMatchPort(name: string | undefined, form?: any) {
|
export function tryMatchPort(name: string | undefined, form?: any) {
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ import { defineConfig } from 'vitest/config';
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
test: {
|
test: {
|
||||||
environment: 'jsdom',
|
environment: 'happy-dom',
|
||||||
coverage: {
|
coverage: {
|
||||||
provider: 'c8',
|
provider: 'c8',
|
||||||
reporter: ['html'],
|
reporter: ['html'],
|
||||||
all: true,
|
all: true,
|
||||||
exclude: ['.next/', '.yarn/', 'data/']
|
exclude: ['.next/', '.yarn/', 'data/'],
|
||||||
},
|
},
|
||||||
setupFiles: [
|
setupFiles: [
|
||||||
"./setupVitest.ts"
|
'./tests/setupVitest.ts',
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user