Logo
Explore Help
Register Sign In
big-bro-watches-everything/devstar
1
0
Fork 0
You've already forked devstar
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
ae8e8f055e9edfe258e641df8752a070ffdd6823
devstar/web_src/js/modules/fetch.test.js

12 lines
336 B
JavaScript
Raw Normal View History

Add fetch wrappers, ignore network errors in actions view (#26985) 1. Introduce lightweight `fetch` wrapper functions that automatically sets csfr token, content-type and use it in `RepoActionView.vue`. 2. Fix a specific issue on `RepoActionView.vue` where a fetch network error is shortly visible during page reload sometimes. It can be reproduced by F5-in in quick succession on the actions view page and was also producing a red error box on the page. Once approved, we can replace all current `fetch` uses in UI with this in another PR. --------- Co-authored-by: Giteabot <teabot@gitea.io>
2023-09-11 10:25:10 +02:00
import {test, expect} from 'vitest';
import {GET, POST, PATCH, PUT, DELETE} from './fetch.js';
// tests here are only to satisfy the linter for unused functions
test('exports', () => {
expect(GET).toBeTruthy();
expect(POST).toBeTruthy();
expect(PATCH).toBeTruthy();
expect(PUT).toBeTruthy();
expect(DELETE).toBeTruthy();
});
Reference in New Issue Copy Permalink
Powered by DevStar Version: 1.25.3+324-g0772a31744 Page: 18ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API ©Mengning Software . 2024-2025 All rights reserved. 苏ICP备2024068144号-3