-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: New query button does not show up issue fixed
- Loading branch information
“sneha122”
committed
Oct 8, 2024
1 parent
8463d02
commit 015ef2a
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { useEditorType, EditorNames } from "./index"; | ||
import { | ||
BUILDER_VIEWER_PATH_PREFIX, | ||
BUILDER_BASE_PATH_DEPRECATED, | ||
} from "constants/routes"; | ||
|
||
describe("useEditorType", () => { | ||
it('should return "app" for BUILDER_VIEWER_PATH_PREFIX', () => { | ||
const result = useEditorType(BUILDER_VIEWER_PATH_PREFIX); | ||
|
||
expect(result).toBe(EditorNames.APPLICATION); | ||
}); | ||
|
||
it('should return "app" for BUILDER_BASE_PATH_DEPRECATED', () => { | ||
const result = useEditorType(BUILDER_BASE_PATH_DEPRECATED); | ||
|
||
expect(result).toBe(EditorNames.APPLICATION); | ||
}); | ||
|
||
it('should default to "app" for unmatched paths', () => { | ||
const result = useEditorType("/some-random-path"); | ||
|
||
expect(result).toBe(EditorNames.APPLICATION); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters