chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
|
||||
// 模拟 pdfjs-dist 模块
|
||||
// Emulate pdfjs-dist module
|
||||
vi.mock('pdfjs-dist', () => ({
|
||||
getDocument: vi.fn(),
|
||||
}));
|
||||
|
||||
// 模拟 generate-assets 和 init-pdfjs-dist 模块
|
||||
// Emulate generate-assets and init-pdfjs-dist modules
|
||||
vi.mock('../src/generate-assets', () => ({
|
||||
generatePdfAssetsUrl: vi.fn(),
|
||||
}));
|
||||
@@ -30,7 +30,7 @@ vi.mock('../src/init-pdfjs-dist', () => ({
|
||||
initPdfJsWorker: vi.fn(),
|
||||
}));
|
||||
|
||||
// 导入被测试的模块
|
||||
// Import the tested module
|
||||
import {
|
||||
generatePdfAssetsUrl,
|
||||
initPdfJsWorker,
|
||||
@@ -39,11 +39,11 @@ import {
|
||||
|
||||
describe('pdfjs-shadow index', () => {
|
||||
it('应该导出所有必要的函数和类型', () => {
|
||||
// 验证导出的函数
|
||||
// Validate the derived function
|
||||
expect(typeof generatePdfAssetsUrl).toBe('function');
|
||||
expect(typeof initPdfJsWorker).toBe('function');
|
||||
|
||||
// 验证从 pdfjs-dist 重新导出的函数和类型
|
||||
// Verify functions and types re-exported from pdfjs-dist
|
||||
expect(getDocument).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user