Blog
Services
Docs
Donate
Status
English
Bahasa Indonesia
Deutsch
English
Español
Esperanto
Filipino
Français
Italiano
Latviešu
Magyar nyelv
Nederlands
Polski
Português de Portugal
Português do Brasil
Slovenščina
Suomi
Svenska
Türkçe
Čeština
Ελληνικά
Български
Русский
Українська
فارسی
日本語
简体中文
繁體中文(台灣)
繁體中文(香港)
한국어
Ark
Search
Create
Migrate
Explore
Login
Blog
Docs
Status
Explore
Login
Ark
Infrastructure
/
forgejo
Watch
0
Fork
You've already forked forgejo
0
mirror of
https://codeberg.org/forgejo/forgejo.git
synced
2024-12-26 09:24:07 -05:00
Code
Issues
Activity
2cc7408b98
forgejo
/
web_src
/
js
/
test
/
setup.js
6 lines
88 B
JavaScript
Raw
Normal View
History
Unescape
Escape
Use weighted algorithm for string matching when finding files in repo (#21370) This PR is for: * https://github.com/go-gitea/gitea/issues/20231 Now, when a user searches `word`, they always see `/{word}.txt` before `/{w}e-g{o}t-{r}esult.{d}at` Demo: When searching "a", "a.ext" comes first. Then when searching "at", the longer matched "template" comes first. <details> ![image](https://user-images.githubusercontent.com/2114189/194588738-3644d891-956f-40e4-b79b-b97d34265456.png) ![image](https://user-images.githubusercontent.com/2114189/194588797-9b124670-4e1e-4510-a170-780295ed89b8.png) </details> This PR also makes the frontend tests could import feature JS files by introducing `jestSetup.js` Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: silverwind <me@silverwind.io>
2022-10-08 06:22:44 -05:00
window
.
config
=
{
Switch from jest to vitest (#21444) Even if we are not bundling with `vite` yet, we can use `vitest` in place of Jest which brings a few benefits like not requiring to use `NODE_OPTIONS` to run and having sane module resolution. It's possible to also use `jest-extended` with vitest, but I opted to not do so for now because it brings heavyweight dependencies and it was trivial to just rewrite the affected matchers to be compatible. This PR also removes 153 JS dependencies, which is certainly nice. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-10-14 08:36:16 -05:00
csrfToken
:
'test-csrf-token-123456'
,
Use weighted algorithm for string matching when finding files in repo (#21370) This PR is for: * https://github.com/go-gitea/gitea/issues/20231 Now, when a user searches `word`, they always see `/{word}.txt` before `/{w}e-g{o}t-{r}esult.{d}at` Demo: When searching "a", "a.ext" comes first. Then when searching "at", the longer matched "template" comes first. <details> ![image](https://user-images.githubusercontent.com/2114189/194588738-3644d891-956f-40e4-b79b-b97d34265456.png) ![image](https://user-images.githubusercontent.com/2114189/194588797-9b124670-4e1e-4510-a170-780295ed89b8.png) </details> This PR also makes the frontend tests could import feature JS files by introducing `jestSetup.js` Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: silverwind <me@silverwind.io>
2022-10-08 06:22:44 -05:00
pageData
:
{
}
,
i18n
:
{
}
,
}
;
Reference in a new issue
Copy permalink