运行测试

    To run tests for all targets, run the task.

    To run tests for a particular target suitable for testing, run a test task <targetName>Test.

    For testing shared code, you can use in your tests.

    For example, to test the shared code in commonMain:

    And the following test in iosTest:

    You can also learn how to create and run multiplatform tests in this tutorial.