Skip to content

Commit 7d56ac5

Browse files
committed
test(frontend): replace network mocks with MSW.
Fixes #34. - Introduced a workaround for the "entry point 'msw' cannot be marked as external" error. - Enabled test isolation, otherwise MSW mocks would cross over to other tests. - Removed `vitest.config.ts`, because it had no effect, and only duplicated configuration. Because Vitest does not work currently in VSCode, I will revisit this problem later. - Configured a more meaningful test timeout (5s). I will increase it if it causes flakiness. - Will now always print the full DOM on testing errors. This is actually more helpful than saving on verbosity.
1 parent 65d8c19 commit 7d56ac5

17 files changed

Lines changed: 782 additions & 374 deletions

‎contenttree-frontend/angular.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
"coverageReporters": ["html", "lcov"],
7878
"coverageInclude": ["src/**/*.ts"],
7979
"coverageExclude": ["src/app/api/schema.d.ts", "src/environments/**/*.ts"],
80-
"headless": true
80+
"runnerConfig": true,
81+
"setupFiles": ["src/test-utils/vitest.setup.ts"]
8182
}
8283
},
8384
"lint": {

0 commit comments

Comments
 (0)