test: Add asset listing test for embedded frontend assets
Some checks failed
Test / get-ci-image (pull_request) Successful in 6s
Test / test-frontend (pull_request) Successful in 30s
Test / lint-frontend (pull_request) Successful in 32s
Verify / get-ci-image (pull_request) Successful in 5s
Verify / verify-generated-db-entities (pull_request) Successful in 3m12s
Test / frontend-build (pull_request) Successful in 23s
Test / lint-crates (pull_request) Failing after 4m6s
Test / test-crates (pull_request) Failing after 4m14s
Some checks failed
Test / get-ci-image (pull_request) Successful in 6s
Test / test-frontend (pull_request) Successful in 30s
Test / lint-frontend (pull_request) Successful in 32s
Verify / get-ci-image (pull_request) Successful in 5s
Verify / verify-generated-db-entities (pull_request) Successful in 3m12s
Test / frontend-build (pull_request) Successful in 23s
Test / lint-crates (pull_request) Failing after 4m6s
Test / test-crates (pull_request) Failing after 4m14s
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -57,6 +57,8 @@ jobs:
|
|||||||
rm -rf apps/nxmesh-master/frontend-dist || true
|
rm -rf apps/nxmesh-master/frontend-dist || true
|
||||||
cp -r apps/nxmesh-frontend/dist apps/nxmesh-master/frontend-dist
|
cp -r apps/nxmesh-frontend/dist apps/nxmesh-master/frontend-dist
|
||||||
|
|
||||||
|
ls -la apps/nxmesh-master/frontend-dist
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --all-features -- --show-output
|
run: cargo test --all-features -- --show-output
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,16 @@ async fn get_file_handler(
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn test_asset() {
|
||||||
|
// list all embedded assets for debugging
|
||||||
|
let assets = FrontendAssets::iter().collect::<Vec<_>>();
|
||||||
|
assert!(
|
||||||
|
!assets.is_empty(),
|
||||||
|
"Expected to find embedded assets, but found none"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_get_index_html() {
|
async fn test_get_index_html() {
|
||||||
let index_html = get_index_html();
|
let index_html = get_index_html();
|
||||||
|
|||||||
Reference in New Issue
Block a user