优化构架

This commit is contained in:
2026-08-03 18:52:30 +08:00
parent 35c713a7ca
commit fed46f42ef
59 changed files with 691 additions and 325 deletions
@@ -2,18 +2,19 @@ import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const routerSource = fs.readFileSync(new URL('../router/index.ts', import.meta.url), 'utf8')
const routerSource = fs.readFileSync(new URL('../routes.ts', import.meta.url), 'utf8')
const profileSource = fs.readFileSync(new URL('./CompanyProfileView.vue', import.meta.url), 'utf8')
const membersSource = fs.readFileSync(new URL('./MembersView.vue', import.meta.url), 'utf8')
const rolesSource = fs.readFileSync(new URL('./RolesView.vue', import.meta.url), 'utf8')
const permissionsSource = fs.readFileSync(new URL('./PermissionsView.vue', import.meta.url), 'utf8')
const storeSource = fs.readFileSync(new URL('../stores/tenantAdministration.ts', import.meta.url), 'utf8')
const storeSource = fs.readFileSync(new URL('../store/tenantAdministration.ts', import.meta.url), 'utf8')
test('routes tenant administration modules to implemented views instead of the placeholder', () => {
assert.match(routerSource, /company\/profile'.*CompanyProfileView\.vue/)
assert.match(routerSource, /organization\/members'.*MembersView\.vue/)
assert.match(routerSource, /organization\/roles'.*RolesView\.vue/)
assert.match(routerSource, /organization\/permissions'.*PermissionsView\.vue/)
assert.match(routerSource, /path: 'company\/profile'[\s\S]*?CompanyProfileView\.vue/)
assert.match(routerSource, /path: 'organization\/members'[\s\S]*?MembersView\.vue/)
assert.match(routerSource, /path: 'organization\/roles'[\s\S]*?RolesView\.vue/)
assert.match(routerSource, /path: 'organization\/permissions'[\s\S]*?PermissionsView\.vue/)
assert.equal((routerSource.match(/release: 'active'/g) ?? []).length, 4)
assert.doesNotMatch(routerSource, /ModuleView\.vue/)
})