Skip to content

Commit 244ed3c

Browse files
committed
rename utils
1 parent 17169c4 commit 244ed3c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/webviews/src/modules/key-details/components/rejson-details/rejson-details/RejsonDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
setReJSONDataAction,
1717
} from '../hooks/useRejsonStore'
1818

19-
import { checkExistingPath } from '../rejson-object/tbd'
19+
import { checkExistingPath } from '../utils/path'
2020
import ReJSONConfirmDialog from '../rejson-object/RejsonConfirmDialog'
2121
import styles from '../styles.module.scss'
2222

src/webviews/src/modules/key-details/components/rejson-details/rejson-object/RejsonObject.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { instance, mock } from 'ts-mockito'
33
import { fireEvent, render, screen, act, waitForStack, constants } from 'testSrc/helpers'
44

55
import { RejsonObject } from './RejsonObject'
6-
import * as tbdUtils from './tbd'
6+
import * as pathUtils from '../utils/path'
77
import * as store from '../hooks/useRejsonStore'
88
import { JSONObjectProps, ObjectTypes } from '../interfaces'
99

@@ -384,7 +384,7 @@ describe('JSONObject', () => {
384384
})
385385

386386
it('should apply new value for existing key after confirming in ConfirmDialog', async () => {
387-
vi.spyOn(tbdUtils, 'checkExistingPath').mockReturnValue(true)
387+
vi.spyOn(pathUtils, 'checkExistingPath').mockReturnValue(true)
388388
vi.spyOn(store, 'useRejsonStore').mockReturnValue({
389389
fullValue: JSON.stringify({ existingKey: 1 }),
390390
})

src/webviews/src/modules/key-details/components/rejson-details/rejson-object/RejsonObject.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { diff } from 'deep-diff'
55
import { useShallow } from 'zustand/react/shallow'
66
import { Spinner } from 'uiSrc/ui'
77

8-
import { checkExistingPath } from './tbd'
98
import ReJSONConfirmDialog from './RejsonConfirmDialog'
9+
import { checkExistingPath } from '../utils/path'
1010
import { RejsonDynamicTypes } from '../rejson-dynamic-types'
1111
import { JSONObjectProps, ObjectTypes } from '../interfaces'
1212
import { generatePath, getBrackets, wrapPath } from '../utils'

src/webviews/src/modules/key-details/components/rejson-details/rejson-object/tbd.spec.ts renamed to src/webviews/src/modules/key-details/components/rejson-details/utils/path.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/quotes */
2-
import { checkExistingPath } from './tbd'
2+
import { checkExistingPath } from './path'
33

44
describe('checkExistingPath', () => {
55
it('returns true for empty path (a.k.a. the whole object)', () => {

0 commit comments

Comments
 (0)