nitro-v36-with-renderer-v36
/
src /
components /
catalog /
admin /
studio /
CatalogStudioTransferPanel.download.test.ts
CatalogStudioTransferPanel.download.test.ts 596 o
Télécharger le fichier
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';
describe('CatalogStudioTransferPanel download', () => {
it('revokes the file URL after the browser had time to start the download', () => {
const source = readFileSync(join(process.cwd(), 'src/components/catalog/admin/studio/CatalogStudioTransferPanel.tsx'), 'utf8');
expect(source).toContain('window.setTimeout(() => URL.revokeObjectURL(url), 1000);');
expect(source).not.toMatch(/link\.click\(\);\s*URL\.revokeObjectURL\(url\);/);
});
});
