This commit is contained in:
parent
b4337dca40
commit
b3935d108d
@ -1,5 +1,5 @@
|
||||
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import http from '@/utils/axios'
|
||||
import { http } from '@/utils/axios'
|
||||
|
||||
export function useLogs() {
|
||||
const category = ref('config')
|
||||
|
||||
@ -18,6 +18,12 @@ function fixture(get) {
|
||||
return { page, dispose: () => dispose() }
|
||||
}
|
||||
|
||||
test('日志页面使用共享 HTTP 客户端的命名导出', () => {
|
||||
const transport = readFileSync(new URL('../../frontend/src/utils/axios.js', import.meta.url), 'utf8')
|
||||
assert.match(transport, /export\s*\{\s*http\s*\}/)
|
||||
assert.match(read('LogSettings.js'), /import\s*\{\s*http\s*\}\s*from\s*['"]@\/utils\/axios['"]/)
|
||||
})
|
||||
|
||||
test('日志页面模板和样式能编译,详情不使用原始 HTML 渲染', () => {
|
||||
const require = createRequire(new URL('../../frontend/package.json', import.meta.url))
|
||||
const { parse, compileScript, compileStyle } = require('@vue/compiler-sfc')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user