Skip to content

Commit

Permalink
#133 add unit test for preference entry list file definition
Browse files Browse the repository at this point in the history
  • Loading branch information
JAGFx committed Sep 13, 2022
1 parent 25c8385 commit 456bd07
Show file tree
Hide file tree
Showing 8 changed files with 413 additions and 5 deletions.
330 changes: 330 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"http-server": "^13.1.0",
"icon-font-generator": "^2.1.11",
"jest": "^28.1.3",
"jest-json-schema": "^6.1.0",
"pkg": "^5.8.0",
"postcss-plugin": "^1.0.0",
"prettier": "^2.7.1",
Expand Down
4 changes: 2 additions & 2 deletions src/jagfx/core/configuration/preference-entry/finder.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PreferenceEntry } from '@/jagfx/core/configuration/preference-entry/PreferenceEntry.js';
import map from '@/jagfx/core/configuration/preference-entry/map.json';
import list from '@/jagfx/core/configuration/preference-entry/list.json';

export const findPreferenceEntryById = (preferenceEntryId) => {
const matches = map.filter(
const matches = list.filter(
(preferenceEntry) => preferenceEntry.id === preferenceEntryId
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const existingConfiguration = [
];

jest.mock(
'@/jagfx/core/configuration/preference-entry/map.json',
'@/jagfx/core/configuration/preference-entry/list.json',
() => existingConfiguration
);

Expand Down
Loading

0 comments on commit 456bd07

Please sign in to comment.