Skip to content
Merged
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
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module.exports = {
'react-leaflet': '<rootDir>/src/_tests_/__mocks__/react-leaflet.js',
'marker-cluster-group': '<rootDir>/src/_tests_/__mocks__/react-leaflet-cluster.js',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', // <-- Added to mock CSS/SCSS files
// Fix for Node.js built-in modules in Node 20
'^node:(.*)$': '$1',
},

// The paths to modules that run some code to configure or set up the testing environment before each test
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
"html-to-pdfmake": "^2.0.6",
"html2canvas": "^1.4.1",
"jest": "^30.2.0",
"joi": "^18.0.2",
"joi-browser": "^13.4.0",
"jquery": "^3.7.1",
"jspdf": "^4.2.1",
"jwt-decode": "^2.2.0",
Expand Down Expand Up @@ -217,4 +219,3 @@
"@rollup/rollup-darwin-arm64": "^4.54.0"
}
}

2 changes: 1 addition & 1 deletion src/components/BMDashboard/AddConsumable/AddConsumable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useState, useEffect, useRef } from 'react';
import { Col, Container, Form, FormGroup, Input, Label, Button, CardBody, Card } from 'reactstrap';
import { useDispatch, useSelector } from 'react-redux';
import Joi from 'joi-browser';
import Joi from 'joi';
import { toast } from 'react-toastify';
import Select from 'react-select';
import PropTypes from 'prop-types';
Expand Down
2 changes: 1 addition & 1 deletion src/components/BMDashboard/AddMaterial/AddMaterial.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import PhoneInput from 'react-phone-input-2';
import { parsePhoneNumberFromString } from 'libphonenumber-js/max';
import { toast } from 'react-toastify';
import { useDispatch, useSelector } from 'react-redux';
import Joi from 'joi-browser';
import Joi from 'joi';
import {
fetchMaterialTypes,
postBuildingInventoryType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from 'react';
import { useSelector } from 'react-redux';
import { toast } from 'react-toastify';
import { Form, FormGroup, Label, Input, Button } from 'reactstrap';
import Joi from 'joi-browser';
import Joi from 'joi';

import { boxStyle } from '~/styles';
import { purchaseConsumable } from '~/actions/bmdashboard/consumableActions';
Expand Down
2 changes: 1 addition & 1 deletion src/components/BMDashboard/Equipment/Add/AddTypeForm.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { Form, FormGroup, FormFeedback, Label, Input, Button } from 'reactstrap';
import Joi from 'joi-browser';
import Joi from 'joi';
import { toast } from 'react-toastify';
import { useHistory } from 'react-router-dom';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Form, FormGroup, FormText, Label, Input, Button } from 'reactstrap';
import Joi from 'joi-browser';
import Joi from 'joi';

import { boxStyle } from '~/styles';
import { purchaseEquipment } from '~/actions/bmdashboard/equipmentActions';
Expand Down
2 changes: 1 addition & 1 deletion src/components/BMDashboard/Login/BMLogin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import { Form, FormGroup, FormText, Input, Label, Button, FormFeedback } from 'reactstrap';
import Joi from 'joi-browser';
import Joi from 'joi';

import { loginBMUser } from '~/actions/authActions';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { Form, FormGroup, Label, Input, Button, Badge } from 'reactstrap';
import { useDispatch, useSelector } from 'react-redux';
import Joi from 'joi-browser';
import Joi from 'joi';
import { boxStyle } from '../../../../styles';
import styles from './CreateNewTeam.module.css';
import { getUserProfileBasicInfo } from '../../../../actions/userManagement';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Form, FormGroup, FormText, Label, Input, Button } from 'reactstrap';
import Joi from 'joi-browser';
import Joi from 'joi';

import { boxStyle } from '~/styles';
import { purchaseTools } from '~/actions/bmdashboard/toolActions';
Expand Down
2 changes: 1 addition & 1 deletion src/components/BMDashboard/Tools/AddToolForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PhoneInput from 'react-phone-input-2';
import { toast } from 'react-toastify';

import { useDispatch, useSelector } from 'react-redux';
import Joi from 'joi-browser';
import Joi from 'joi';
import { boxStyle } from '~/styles';
import styles from './AddToolForm.module.css';

Expand Down
Loading
Loading