Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on:
push:
branches: ["main"]
pull_request:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run check
- run: bun run build
11 changes: 7 additions & 4 deletions tests/native.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { describe, expect, test } from "bun:test";
import { mkdirSync, mkdtempSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import {
createMusicApplicationSource,
decodeArtworkData,
Expand Down Expand Up @@ -70,10 +73,10 @@ describe("native artwork", () => {
});

describe("native Music.app resolution", () => {
test("uses the system Music.app path when it exists", () => {
expect(createMusicApplicationSource("/System/Applications/Music.app")).toBe(
'Application("/System/Applications/Music.app")',
);
test("uses the Music.app path when it exists", () => {
const appPath = join(mkdtempSync(join(tmpdir(), "setlist-")), "Music.app");
mkdirSync(appPath);
expect(createMusicApplicationSource(appPath)).toBe(`Application(${JSON.stringify(appPath)})`);
});

test("falls back to the application name when the system path is missing", () => {
Expand Down
Loading