mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-21 18:02:35 +01:00
move to vitest 🚀
This commit is contained in:
parent
89844d40a0
commit
ef406daa6e
@ -5,8 +5,7 @@
|
||||
],
|
||||
"env": {
|
||||
"node": true,
|
||||
"browser": true,
|
||||
"jest": true
|
||||
"browser": true
|
||||
},
|
||||
"rules": {
|
||||
"max-len": 0,
|
||||
|
16
package.json
16
package.json
@ -16,7 +16,7 @@
|
||||
"download-ffmpeg-linux-x64": "mkdirp ffmpeg/linux-x64 && cd ffmpeg/linux-x64 && wget https://github.com/mifi/ffmpeg-builds/releases/download/5.1.2/linux-x64-v5.1.1.tar.xz -O ffmpeg-ffprobe.xz && tar -xv --strip-components=1 -f ffmpeg-ffprobe.xz ffmpeg-5.1.1-amd64-static/ffmpeg ffmpeg-5.1.1-amd64-static/ffprobe",
|
||||
"download-ffmpeg-win32-x64": "mkdirp ffmpeg/win32-x64 && cd ffmpeg/win32-x64 && npx download-cli https://github.com/mifi/ffmpeg-builds/releases/download/5.1.2/win32-x64-v5.1.2.7z --out . --filename ffmpeg-ffprobe.7z && 7z x ffmpeg-ffprobe.7z && npx shx mv ffmpeg-5.1.2-essentials_build/bin/ffmpeg.exe ./ && npx shx mv ffmpeg-5.1.2-essentials_build/bin/ffprobe.exe ./",
|
||||
"build": "yarn icon-gen && vite build --outDir vite-dist",
|
||||
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "vitest",
|
||||
"lint": "eslint --ext .jsx --ext .js . --ext .mjs",
|
||||
"pack-mac": "electron-builder --mac -m dmg",
|
||||
"prepack-mac": "yarn build",
|
||||
@ -42,7 +42,6 @@
|
||||
},
|
||||
"license": "GPL-2.0-only",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.20",
|
||||
"@types/sortablejs": "^1.15.0",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"color": "^3.1.0",
|
||||
@ -65,7 +64,6 @@
|
||||
"framer-motion": "^9.0.3",
|
||||
"i18next-scanner": "^4.1.0",
|
||||
"icon-gen": "^3.0.0",
|
||||
"jest": "^29.4.3",
|
||||
"ky": "^0.33.1",
|
||||
"mkdirp": "^1.0.3",
|
||||
"moment": "^2.29.4",
|
||||
@ -92,6 +90,7 @@
|
||||
"use-trace-update": "^1.3.0",
|
||||
"uuid": "^8.3.2",
|
||||
"vite": "^4.1.1",
|
||||
"vitest": "^0.28.5",
|
||||
"wait-on": "^7.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -120,17 +119,6 @@
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"jest": {
|
||||
"extensionsToTreatAsEsm": [
|
||||
".js",
|
||||
".mjs"
|
||||
],
|
||||
"testEnvironment": "node",
|
||||
"testMatch": [
|
||||
"**/__tests__/**/*.?([mc])[jt]s?(x)",
|
||||
"**/?(*.)+(spec|test).?([mc])[jt]s?(x)"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"directories": {
|
||||
"buildResources": "build-resources"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1
|
||||
|
||||
exports[`parses fcpxml 1.9 1`] = `
|
||||
[
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1
|
||||
|
||||
exports[`converts segments to chapters with gaps 1`] = `
|
||||
[
|
||||
|
@ -1,6 +1,8 @@
|
||||
import fs from 'fs/promises';
|
||||
import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { it, expect } from 'vitest';
|
||||
|
||||
|
||||
import { parseYouTube, formatYouTube, parseMplayerEdl, parseXmeml, parseFcpXml, parseCsv, getTimeFromFrameNum, formatCsvFrames, getFrameCountRaw, parsePbf } from './edlFormats';
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { it, expect } from 'vitest';
|
||||
|
||||
import { convertSegmentsToChapters, partitionIntoOverlappingRanges, getSegApparentStart, getSegApparentEnd } from './segments';
|
||||
|
||||
it('converts segments to chapters with gaps', () => {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { it, expect } from 'vitest';
|
||||
|
||||
import { formatDuration, parseDuration } from './duration';
|
||||
|
||||
it('should format duration properly', () => {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
import { adjustRate, DEFAULT_PLAYBACK_RATE } from './rate-calculator';
|
||||
|
||||
it('inverts for reverse direction', () => {
|
||||
|
@ -1,5 +1,8 @@
|
||||
import { test, expect } from 'vitest';
|
||||
|
||||
import { getMapStreamsArgs, getStreamIdsToCopy } from './streams';
|
||||
|
||||
|
||||
const streams1 = [
|
||||
{ index: 0, codec_type: 'video', codec_tag: '0x0000', codec_name: 'mjpeg', disposition: { attached_pic: 1 } },
|
||||
{ index: 1, codec_type: 'audio', codec_tag: '0x6134706d', codec_name: 'aac' },
|
||||
|
Loading…
Reference in New Issue
Block a user