mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 19:59:50 +08:00
refactor(workspace): enforce layered crate boundaries
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const source = readFileSync(
|
||||
resolve(process.cwd(), 'src/views/admin/WalletsManagement.vue'),
|
||||
'utf8',
|
||||
)
|
||||
|
||||
describe('WalletsManagement wallet metadata loading', () => {
|
||||
it('only loads the full wallet metadata map for the orders tab', () => {
|
||||
const mountedBlock = source
|
||||
.split('onMounted(async () => {')[1]
|
||||
?.split('})')[0]
|
||||
expect(mountedBlock).toBeTruthy()
|
||||
expect(mountedBlock).not.toContain('loadWalletMetaMap()')
|
||||
|
||||
const ordersBranch = source
|
||||
.split("case 'orders':")[1]
|
||||
?.split("case 'callbacks':")[0]
|
||||
expect(ordersBranch).toBeTruthy()
|
||||
expect(ordersBranch).toContain('Promise.all([loadOrders(), loadWalletMetaMap()])')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user