Skip to content

test: add an IgnoreOnWeb annotation#3034

Open
Luna712 wants to merge 4 commits into
recloudstream:masterfrom
Luna712:patch-6
Open

test: add an IgnoreOnWeb annotation#3034
Luna712 wants to merge 4 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.

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.

1 participant