diff --git a/.github/workflows/vitest.yml b/.github/workflows/vitest.yml new file mode 100644 index 0000000000..fd7c0f1c38 --- /dev/null +++ b/.github/workflows/vitest.yml @@ -0,0 +1,23 @@ +name: JavaScript Unit Tests +on: + pull_request: + paths: + - 'src/**' + - '.github/workflows/vitest.yml' + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 'latest' + - run: npm ci + - run: npx vitest src/components diff --git a/src/components/omniSidebarNav/helpers.js b/src/components/omniSidebarNav/helpers.js index a4e15c571e..4c9d7636e5 100644 --- a/src/components/omniSidebarNav/helpers.js +++ b/src/components/omniSidebarNav/helpers.js @@ -17,10 +17,12 @@ const turnItemsIntoLinks = (item, activePage) => { // If the link is external, add an icon to indicate that. // Internal links will start with a slash. if (item.link.startsWith('http')) { - linkText = ( - <> - {item.title} - + linkText = React.createElement( + React.Fragment, + null, + React.createElement(Icon, { iconName: "externalLink" }), + " ", + item.title ); }