const assert = require('node:assert/strict') const fs = require('node:fs') const path = require('node:path') const root = path.resolve(__dirname, '..') const routes = fs.readFileSync(path.join(root, 'src/router/routes.ts'), 'utf8') const authPage = fs.readFileSync(path.join(root, 'src/pages/auth/DemoRegisterPage.vue'), 'utf8') const operatorPage = fs.readFileSync(path.join(root, 'src/pages/operator/OperatorRegisterPage.vue'), 'utf8') const authApi = fs.readFileSync(path.resolve(root, '../backend/src/main/java/com/danyang/match/platform/auth/controller/AuthController.java'), 'utf8') const operatorApi = fs.readFileSync(path.resolve(root, '../backend/src/main/java/com/danyang/match/platform/auth/controller/OperatorAuthController.java'), 'utf8') assert.match(routes, /path: '\/register'/) assert.match(routes, /path: '\/operator\/register'/) assert.match(authPage, /auth\.registerDemo\(/) assert.match(operatorPage, /operatorService\.registerDemo\(/) assert.match(authApi, /@PostMapping\("\/demo\/register"\)/) assert.match(operatorApi, /@PostMapping\("\/demo\/register"\)/) console.log('PASS: demo registration routes and APIs are wired')