|
- import {
- describe, it, expect, vi,
- } from 'vitest';
- import * as childProcess from 'child_process';
- import * as youtubeClipCore from '../src';
-
- vi.mock('child_process', () => ({
- spawnSync: vi.fn(),
- }));
-
- describe('clipVideo', () => {
- it('works', () => {
- youtubeClipCore.clipVideo({
- type: youtubeClipCore.VideoType.YOUTUBE,
- url: 'https://www.youtube.com/watch?v=BaW_jenozKc',
- start: 0,
- end: 0,
- });
-
- expect(childProcess.spawnSync).toBeCalledTimes(2);
- });
- });
|