Skip to content

Commit

Permalink
Replace enzyme (#1201)
Browse files Browse the repository at this point in the history
* replace enzyme with testing library

* fix tests

* fix tests and add TODOs

* fix tests

* update browser test

* fix tests

* lint code

* partially update app-error-boundary tests

* fix some tests

* regen lock files

* fix route-component tests

* remove test that tests implementation detail

* update tests for throw-404

* clean up

* clean up

* update app-error-boundary test

* lint code

* remove container from document test

* remove debug

* lint code

* update focus test

* linting

* update lock files

---------

Co-authored-by: Joel Uong <joel.uong@salesforce.com>
Co-authored-by: Joel Uong <88680517+joeluong-sfcc@users.noreply.github.com>
  • Loading branch information
3 people committed May 15, 2023
1 parent 4b4667f commit b18c75c
Show file tree
Hide file tree
Showing 16 changed files with 2,689 additions and 1,849 deletions.
2 changes: 1 addition & 1 deletion packages/commerce-sdk-react/src/test-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function renderHookWithProviders<TProps, TResult>(
})
}

const NOCK_DELAY = 50;
const NOCK_DELAY = 50
/** Mocks DELETE, PATCH, POST, and PUT so we don't have to look up which verb an endpoint uses. */
export const mockMutationEndpoints = (
matchingPath: string,
Expand Down
3 changes: 1 addition & 2 deletions packages/pwa-kit-react-sdk/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
*/
/* eslint-disable @typescript-eslint/no-var-requires */
const base = require('internal-lib-build/configs/jest/jest.config')
const path = require('path')

module.exports = {
...base,
setupFiles: base.setupFiles.concat(path.join(__dirname, 'setup-jest.js')),
setupFilesAfterEnv: ['./setup-jest.js'],
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'scripts/**/*.{js,jsx}',
Expand Down
Loading

0 comments on commit b18c75c

Please sign in to comment.