2 Star 0 Fork 0

mirrors_hyperledger/identus-edge-agent-sdk-ts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vitest.config.mjs 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import { getWasmJSContent } from './esbuild.base.mjs';
const isCI = process.env.CI === "true";
function WasmPlugin() {
return {
name: 'wasm-plugin',
resolveId: (source, importer) =>
source.endsWith('.wasm') ?
path.resolve(path.dirname(importer), source) :
null,
load: (id) => id.endsWith('.wasm') ?
getWasmJSContent(id) :
null,
};
}
const testConfig = {
setupFiles: ['./tests/setup.ts'],
reporters: ['verbose'],
coverage: {
provider: 'istanbul',
reporter: isCI ? ['json-summary', 'lcov'] : ['json-summary', "html"],
thresholds: {
"branches": 63,
"functions": 75,
"lines": 75,
"statements": 75
},
include: [
'src'
],
exclude: [
'src/castor/protos',
'src/domain/models/errors'
]
},
}
export default defineConfig({
plugins: [
WasmPlugin(),
],
resolve: {
extensions: ['.ts', '.js', '.wasm'],
mainFields: ['module', 'main'],
},
test: {
...testConfig,
environment: 'jsdom',
include: ['tests/**/*.test.ts'],
},
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_hyperledger/identus-edge-agent-sdk-ts.git
git@gitee.com:mirrors_hyperledger/identus-edge-agent-sdk-ts.git
mirrors_hyperledger
identus-edge-agent-sdk-ts
identus-edge-agent-sdk-ts
main

搜索帮助