aboutsummaryrefslogtreecommitdiffstats
path: root/jest.config.js
Commit message (Collapse)AuthorAgeFilesLines
* Enable contenthash in filename for dynamic assets (#20813)silverwind2022-08-231-1/+1
| | | | | This should solve the main problem of dynamic assets getting stale after a version upgrade. Everything not affected will use query-string based cache busting, which includes files loaded via HTML or worker scripts.
* Update JS dependencies (#19675)silverwind2022-05-101-2/+2
| | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies minus vue and vue-loader - Adapt to jest 28 - Add new eslint rules - Tested Mermaid and Swagger-UI * switch to @happy-dom/jest-environment for faster tests * bump eslint env to es2022
* Add copy button to markdown code blocks (#17638)silverwind2021-11-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add copy button to markdown code blocks Done mostly in JS because I think it's better not to try getting buttons past the markup sanitizer. * add svg module tests * fix sanitizer regexp * remove outdated comment * vertically center button in issue comments as well * add comment to css * fix undefined on view file line copy * combine animation less files * Update modules/markup/markdown/markdown.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * add test for different sizes * add cloneNode and add tests for it * use deep clone * remove useless optional chaining * remove the svg node cache * unify clipboard copy string and i18n * remove unused var * remove unused localization * minor css tweaks to the button * comment tweak * remove useless attribute Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update JS dependencies (#17357)silverwind2021-10-191-1/+1
| | | | | | | | | | | | | * Update JS dependencies - Upgrade to eslint 8 and add new plugin rules - Adapt to various API changes - Rebuild SVGs * fix webpack warning on license * order options alphabetically Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update JS dependencies (#16708)silverwind2021-08-171-4/+3
| | | | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies - Adapt to recent webpack changes - Add new lint rules and fix issues - Regenerate SVGs and update svgo api usage Fixes: https://github.com/go-gitea/gitea/pull/16492 * adapt jest config and sort keys Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add jest rootDir and test-frontend dependency (#15860)silverwind2021-05-141-1/+2
| | | | | - Define jest rootDir to limit where it looks for test files - Add missing dependency on test-frontend target so it can be ran from a clean checkout
* Add frontend testing, require node 12 (#15315)silverwind2021-04-081-0/+10
- Add basic frontend unit testing infrastructure using jest in ESM mode - Rename 'make test' to 'make test-backend' - Introduce 'make test-frontend' and 'make test' that runs both - Bump Node.js requirement to v12. v10 will be EOL in less than a month. - Convert all build-related JS files to ESM. I opted to run frontend tests run as part of the compliance pipeline because they complete fast and are not platform-specific like the golang tests.