Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

build: skip yt-dlp tests on ci

Christian Feice22f17d0a81
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 34126fc..05e667a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,6 +17,5 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- - run: pip install yt-dlp
- run: npm ci
- run: npm test
diff --git a/test/youtube.test.js b/test/youtube.test.js
index 2f1ae09..fab9776 100644
--- a/test/youtube.test.js
+++ b/test/youtube.test.js
@@ -2,6 +2,7 @@ import { test } from 'node:test'
import assert from 'assert';
import { getVideosFor, getVideo, extractIdFromUrl, isYouTubeUrl, isUnsupportedUrl, isVideoId } from '../lib/youtube.js'
+if (!process.env.CI) {
test('gets videos for channel', async () => {
const videos = await getVideosFor('veritasium')
const video = videos[0]
@@ -30,6 +31,7 @@ test('gets single video', async () => {
assert.ok(video.viewCount)
assert.equal(video.duration, '33:36')
})
+}
test('extracts id from url', () => {
assert.equal(extractIdFromUrl('https://www.youtube.com/watch?v=SOME_ID&pp=something'), 'SOME_ID')