create-block-theme/test/unit/jest.config.js
Vicente Canales 4514b96e55
Add quotes to font family names (#476)
* Add quotes to families ending in number on gfonts

* Add quotes to uploaded font family name

* Check for special characters on form upload

* Trim font names

* Avoid re-rendering due to function definitions

Moves the definition of onFormDataChange inside the effect where it's
used so that it won't be re defined on render.

Also, wraps isFormValid on useCallback for the same reason.

* Add quotes to all font name strings

https://github.com/WordPress/create-block-theme/pull/476#issuecomment-1812587764

* Add tests

Add dependencies required for test and linting as well:

- @wordpress/scripts
- @wordpress/eslint-plugin

* Temporarily disable eslint rule

Out of scope for this PR; follow-up to come.

* Add quotes to demo style font name
2023-11-15 13:06:27 -03:00

10 lines
256 B
JavaScript

module.exports = {
testEnvironment: 'jsdom',
rootDir: '../../',
testMatch: [ '<rootDir>/src/test/**/*.js' ],
moduleFileExtensions: [ 'js' ],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
setupFiles: [ '<rootDir>/test/unit/setup.js' ],
};