Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

RBuilderSingle is not a constructor #3

Open
skrabbenborg opened this issue Jan 12, 2022 · 0 comments
Open

RBuilderSingle is not a constructor #3

skrabbenborg opened this issue Jan 12, 2022 · 0 comments

Comments

@skrabbenborg
Copy link

skrabbenborg commented Jan 12, 2022

A simple test I've written could not be executed due to TypeError: RBuilderSingle is not a constructor.

dependencies {
    ...
    implementation("io.github.mysticfall:kotlin-react-test:1.2.0")
}
import kotlin.test.Test
import mysticfall.kotlin.react.test.ReactTestSupport
import react.dom.html.ReactHTML.div

class Test : ReactTestSupport {

    @Test
    fun test() {
        val renderer = render {
            div {
                +"Test"
            }
        }
    }
}
TypeError: RBuilderSingle is not a constructor
TypeError: RBuilderSingle is not a constructor
	at Test.ReactTestSupport.render_or9nxs$$default(C:\Users\Sander\Documents\myproject\src\main\kotlin\ReactTestSupport.kt:18)
	at Test.ReactTestSupport.render(C:\Users\user\Documents\myproject\src\main\kotlin\ReactTestSupport.kt:14)
	at Test.ReactTestSupport.render(C:\Users\user\Documents\myproject\src\main\kotlin\ReactTestSupport.kt:12)
	at Test.test(C:\Users\user\Documents\myproject\src\test\kotlin\Test.kt:9)
	at <global>.fn(kotlin\my-project-test.js:55)
	at Context.<anonymous>(C:\Users\user\Documents\myproject\build\js\packages_imported\kotlin-test-js-runner\src\KotlinTestTeamCityConsoleAdapter.ts:72)
	at <global>.processImmediate(internal/timers.js:462)

Any idea what i'm doing wrong here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant