Clip Web videos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 line
500 B

  1. import {
  2. describe, it, expect, vi,
  3. } from 'vitest';
  4. import * as childProcess from 'child_process';
  5. import * as youtubeClipCore from '../src';
  6. vi.mock('child_process', () => ({
  7. spawnSync: vi.fn(),
  8. }));
  9. describe('clipVideo', () => {
  10. it('works', () => {
  11. youtubeClipCore.clipVideo({
  12. type: youtubeClipCore.VideoType.YOUTUBE,
  13. url: 'https://www.youtube.com/watch?v=BaW_jenozKc',
  14. start: 0,
  15. end: 0,
  16. });
  17. expect(childProcess.spawnSync).toBeCalledTimes(2);
  18. });
  19. });