diff --git a/front/lib/calcFileHash.test.ts b/front/tests/utils/calcFileHash.test.ts similarity index 96% rename from front/lib/calcFileHash.test.ts rename to front/tests/utils/calcFileHash.test.ts index ac0c8c5..5f4e796 100644 --- a/front/lib/calcFileHash.test.ts +++ b/front/tests/utils/calcFileHash.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import calcFileHash from './calcFileHash' +import calcFileHash from '@/lib/calcFileHash' const makeFile = (content: string) => new File([content], 'test.txt', { type: 'text/plain' }) diff --git a/front/vitest.config.ts b/front/vitest.config.ts new file mode 100644 index 0000000..9475829 --- /dev/null +++ b/front/vitest.config.ts @@ -0,0 +1,15 @@ +import { fileURLToPath, URL } from 'node:url' +import { defineConfig } from 'vitest/config' + +const rootDir = fileURLToPath(new URL('./', import.meta.url)) + +export default defineConfig({ + resolve: { + alias: [ + { find: /^@\/(.*)$/, replacement: `${rootDir}$1` }, + { find: /^~\/(.*)$/, replacement: `${rootDir}$1` }, + { find: /^@@\/(.*)$/, replacement: `${rootDir}$1` }, + { find: /^~~\/(.*)$/, replacement: `${rootDir}$1` }, + ], + }, +})