Просмотр исходного кода

Add eslint rules for skipped/focused tests (and fix issues)

GitOrigin-RevId: 01735e0805a28609a68df667cd2a4c3d89c5b968
Andrew Rumble 1 год назад
Родитель
Сommit
5b764953c0

+ 4 - 0
services/web/.eslintrc.js

@@ -109,6 +109,10 @@ module.exports = {
       },
       plugins: ['@vitest', 'chai-expect', 'chai-friendly'], // still using chai for now
       rules: {
+        // vitest-specific rules
+        '@vitest/no-focused-tests': 'error',
+        '@vitest/no-disabled-tests': 'error',
+
         // Swap the no-unused-expressions rule with a more chai-friendly one
         'no-unused-expressions': 'off',
         'chai-friendly/no-unused-expressions': 'error',

+ 1 - 1
services/web/test/unit/src/Referal/ReferalController.test.mjs

@@ -1,6 +1,6 @@
 const modulePath = '../../../../app/src/Features/Referal/ReferalController.js'
 
-describe.skip('Referal controller', function () {
+describe.todo('Referal controller', function () {
   beforeEach(async function (ctx) {
     ctx.controller = (await import(modulePath)).default
   })