Skip to content

test: add an IgnoreOnWeb annotation#3034

Merged
fire-light42 merged 5 commits into
recloudstream:masterfrom
Luna712:patch-6
Jul 13, 2026
Merged

test: add an IgnoreOnWeb annotation#3034
fire-light42 merged 5 commits into
recloudstream:masterfrom
Luna712:patch-6

Conversation

@Luna712

@Luna712 Luna712 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

For some things like coroutines, when compiled to JS tests will fail because it is single threaded, and it can't cancel a synchronous operation from a single threaded system. That causes a few tests from #2812 to fail on JS only, rather than splitting the location for the tests per platform, which can make it harder to find, just ignoring the tests would be better. With this we could then just add @IgnoreOnWeb to the tests we don't care about. The actual in webTest would later be:

package com.lagradost.cloudstream3.utils

import kotlin.test.Ignore

actual typealias IgnoreOnWeb = Ignore

and because of @OptionalExpectation, we don't need to add actual to any other source sets. I decided to do this as a different PR rather than in #2812 because it is kinda different scope after all, and I don't want to drift that scope to much.

I also used Ignore.kt as the file name because IgnoreOnWeb.kt would mean for webTest it would be IgnoreOnWeb.web.kt which just seems a bit odd. Additionally this way if we ever need we could also add more in the same file like IgnoreOnJvm or IgnoreOnAndroid.

@Luna712 Luna712 requested a review from fire-light42 July 13, 2026 16:49

@fire-light42 fire-light42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thinking

@fire-light42 fire-light42 merged commit 076e7a5 into recloudstream:master Jul 13, 2026
2 checks passed
@Luna712 Luna712 deleted the patch-6 branch July 13, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants