Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
KingSora committed Jun 10, 2024
1 parent a1abe27 commit f593922
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('OverlayScrollbarsComponent', () => {
const htmlElement = document.documentElement;
document.body.remove();

const { debug, unmount } = render(OverlayScrollbarsComponent, {
const { unmount } = render(OverlayScrollbarsComponent, {
props: {
element: 'body',
},
Expand All @@ -40,8 +40,6 @@ describe('OverlayScrollbarsComponent', () => {
container: htmlElement,
});

debug();

expect(htmlElement).toHaveAttribute('data-overlayscrollbars');
expect(htmlElement.querySelector('body')).toHaveAttribute('data-overlayscrollbars-initialize');
expect(htmlElement.querySelector('body')).not.toBeEmptyDOMElement();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export const isBrowser =
// deno has the global `window` defined
typeof window !== 'undefined' &&
// deno has the global `window` defined, so additionally check for document
typeof document !== 'undefined';
// make sure HTML element is available
typeof HTMLElement !== 'undefined' &&
// make sure document is defined
!!window.document;

0 comments on commit f593922

Please sign in to comment.