Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dashboard/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const config = {
],

// Setup files
setupFiles: ['<rootDir>/src/setupTests.polyfills.ts'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.simple.ts'],

// Module name mapping for path aliases
Expand Down
65 changes: 41 additions & 24 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"react-querybuilder": "8.0.0",
"react-quill-new": "3.4.1",
"react-redux": "9.1.0",
"react-router-dom": "6.30.4",
"react-router": "7.18.2",
"react-router-dom": "7.18.2",
"react-toastify": "10.0.5",
"recharts": "2.15.1",
"sanitize-html": "2.17.4"
Expand Down
21 changes: 21 additions & 0 deletions dashboard/src/setupTests.polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { TextEncoder, TextDecoder } from 'util';

// Polyfills for Jest jsdom compatibility
Object.assign(global, { TextEncoder, TextDecoder });
Loading