Skip to content

Commit

Permalink
chore: Removed enzyme package and its last references (#7263)
Browse files Browse the repository at this point in the history
#### Details

As we have already replaced enzyme with react testing library in all
unit test cases so this is final PR to remove enzyme package from repo.

##### Motivation

Existing User Story : [User Story
2142858](https://dev.azure.com/mseng/1ES/_workitems/edit/2142858):
Enzyme replacement in files under src/tests/unit/tests/injected

##### Context

<!-- Are there any parts that you've intentionally left out-of-scope for
a later PR to handle? -->

<!-- Were there any alternative approaches you considered? What
tradeoffs did you consider? -->

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [n/a] Addresses an existing issue: #0000
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic
tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See
`CONTRIBUTING.md`.
- [n/a] (UI changes only) Added screenshots/GIFs to description above
- [n/a] (UI changes only) Verified usability with NVDA/JAWS
  • Loading branch information
v-viyada authored Mar 7, 2024
1 parent 0d4cf91 commit 532ceb1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 562 deletions.
2 changes: 1 addition & 1 deletion docs/building-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ IDEs/Editors like VSCode will run the TypeScript compiler in the background prov
### Testing
We use [Jest](https://github.com/facebook/jest) as our test framework, along with [typemoq](https://github.com/florinn/typemoq) and [enzyme](https://github.com/enzymejs/enzyme). We make liberal use of [Snapshot Testing](https://jestjs.io/docs/en/snapshot-testing) for unit tests of React components.
We use [Jest](https://github.com/facebook/jest) as our test framework, along with [typemoq](https://github.com/florinn/typemoq) and [react-testing-library](https://github.com/testing-library/react-testing-library). We make liberal use of [Snapshot Testing](https://jestjs.io/docs/en/snapshot-testing) for unit tests of React components.
#### Unit Tests
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "12.1.2",
"@types/chrome": "0.0.260",
"@types/enzyme": "^3.10.18",
"@types/enzyme-adapter-react-16": "^1.0.9",
"@types/jest": "^29.5.11",
"@types/jsdom": "^21.1.6",
"@types/lodash": "^4.14.202",
Expand All @@ -104,8 +102,6 @@
"core-js-bundle": "^3.35.0",
"cross-env": "^7.0.3",
"css-loader": "^6.9.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.7",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
Expand Down
3 changes: 0 additions & 3 deletions src/tests/unit/jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// Licensed under the MIT License.
import * as util from 'util';
import { setIconOptions } from '@fluentui/react';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });
setIconOptions({
disableWarnings: true,
});
Expand Down
Loading

0 comments on commit 532ceb1

Please sign in to comment.