Skip to content

Commit

Permalink
test: fix dictionary store tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rue-pro committed Apr 9, 2024
1 parent 3a62400 commit 9ece31d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/background/features/autoAddNewNote/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { map } from 'nanostores'

import {
GOOGLE_TRANSLATE,
dictionariesUrls,
getDictionariesUrls,
getDictionaryByPageUrl,
getSelectorsFromDictionary,
} from '@entities/dictionary'
Expand All @@ -28,7 +28,7 @@ export const autoAddNewNote = (parentId: string) => {
id: 'auto_new_note',
parentId: parentId,
contexts: ['page'],
documentUrlPatterns: dictionariesUrls,
documentUrlPatterns: getDictionariesUrls(),
})

const handleClick = async (
Expand Down
4 changes: 1 addition & 3 deletions src/entities/dictionary/model/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getSelectorsFromDictionary = (
return dictionary.selectors
}

const getDictionariesUrls = (): string[] => {
export const getDictionariesUrls = (): string[] => {
const urls: string[] = []
const languages = Object.entries(DICTIONARIES)

Expand All @@ -66,5 +66,3 @@ const getDictionariesUrls = (): string[] => {

return urls
}

export const dictionariesUrls = getDictionariesUrls()

0 comments on commit 9ece31d

Please sign in to comment.