We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 822dd39 commit 0b0d1b8Copy full SHA for 0b0d1b8
1 file changed
src/header/hooks.test.tsx
@@ -225,7 +225,21 @@ describe('header utils', () => {
225
});
226
227
describe('useLibrarySettingsMenuItems', () => {
228
+ let originalConfig: any;
229
+
230
+ beforeEach(() => {
231
+ originalConfig = { ...getConfig() };
232
+ });
233
234
+ afterEach(() => {
235
+ setConfig(originalConfig);
236
237
238
it('should contain team access url', () => {
239
+ const configWithoutAdminConsole = { ...getConfig() };
240
+ delete configWithoutAdminConsole.ADMIN_CONSOLE_URL;
241
+ setConfig(configWithoutAdminConsole);
242
243
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', false), { wrapper: createWrapper() }).result.current;
244
expect(items).toContainEqual({ title: 'Library Team', href: 'http://localhost/?sa=manage-team' });
245
0 commit comments