mirror of
https://git.netzspielplatz.de/docker-multiarch/openwrt-firmware-selector.git
synced 2025-11-08 18:59:27 +00:00
fix failing test
This commit is contained in:
parent
7cdb5206af
commit
3fa4a871fc
5 changed files with 14 additions and 10 deletions
|
|
@ -23,7 +23,6 @@ module.exports = {
|
|||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
trailingComma: 'all',
|
||||
arrowParens: 'always',
|
||||
printWidth: 100,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ module.exports = {
|
|||
// using ts-jest
|
||||
transform: {
|
||||
'^.+\\.tsx?$': 'ts-jest',
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
'jest-transform-stub',
|
||||
},
|
||||
|
||||
// Runs special logic, such as cleaning up components
|
||||
|
|
@ -24,7 +26,6 @@ module.exports = {
|
|||
|
||||
moduleNameMapper: {
|
||||
'^.+\\.(css|scss)$': 'identity-obj-proxy',
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
'<rootDir>/fileMocks.js',
|
||||
'^.+.(png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"husky": "^3.0.5",
|
||||
"jest": "^26.6.3",
|
||||
"jest-transform-stub": "^2.0.0",
|
||||
"prettier": "^2.2.1",
|
||||
"pretty-quick": "^1.11.1",
|
||||
"sass": "^1.32.2",
|
||||
|
|
|
|||
|
|
@ -73,13 +73,11 @@ const ProfileSearch: FunctionComponent<Props> = ({ selectedVersion, onProfileCha
|
|||
options: SearchData[],
|
||||
state: FilterOptionsState<SearchData>
|
||||
) => SearchData[] = (options, { inputValue }) =>
|
||||
throttle(
|
||||
() =>
|
||||
matchSorter(options, inputValue.replaceAll(' ', ''), {
|
||||
keys: ['search'],
|
||||
}).slice(0, 10),
|
||||
1000
|
||||
)() || [];
|
||||
throttle(() => {
|
||||
return matchSorter(options, inputValue.replaceAll?.(' ', '') || inputValue, {
|
||||
keys: ['search'],
|
||||
}).slice(0, 10);
|
||||
}, 1000)() || [];
|
||||
|
||||
if (working) return <CircularProgress />;
|
||||
|
||||
|
|
|
|||
|
|
@ -7125,6 +7125,11 @@ jest-snapshot@^26.6.0, jest-snapshot@^26.6.2:
|
|||
pretty-format "^26.6.2"
|
||||
semver "^7.3.2"
|
||||
|
||||
jest-transform-stub@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-transform-stub/-/jest-transform-stub-2.0.0.tgz#19018b0851f7568972147a5d60074b55f0225a7d"
|
||||
integrity sha512-lspHaCRx/mBbnm3h4uMMS3R5aZzMwyNpNIJLXj4cEsV0mIUtS4IjYJLSoyjRCtnxb6RIGJ4NL2quZzfIeNhbkg==
|
||||
|
||||
jest-util@^26.1.0, jest-util@^26.6.0, jest-util@^26.6.2:
|
||||
version "26.6.2"
|
||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue