187 Commits

Author SHA1 Message Date
Vladimir Sukharev e03af07a1c [Tests] Revive KlibEvolutionTests
Allows CI testing for KT-44602, KT-44604, KT-44598, KT-44599, KT-66342

^KT-44602
2024-03-16 07:50:33 +00:00
Artem Kobzar 8d4948c3ee [K/Wasm] Generate .d.ts tests for K/Wasm in the same way as we do for K/JS ^KT-65778 Fixed 2024-03-05 15:33:56 +00:00
Ilya Goncharov d1664c6791 Not capture Gradle script reference in installTsDependencies on execution phase 2024-01-24 13:57:19 +00:00
Ilya Gorbunov c40de28775 Replace kotlin-test-js project dependencies in the project
KT-61969
2023-12-13 15:40:25 +00:00
Alexander.Likhachev eab2c6b9b9 [Build] Bump gradle-node-plugin version to 7.0.1
This change is required to fix a configuration cache problem revealed after migration to Gradle 8.4
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev a19bd2ed2e [Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3

There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Artem Kobzar 98186ec283 [K/JS] Add ES6 typescript tests + fix a few bugs for it 2023-11-30 13:37:06 +00:00
Artem Kobzar ff50d40b32 [K/JS] Rework kotlin tests compilation to make it works with per-file granularity ^KT-61525 Fixed 2023-11-16 19:02:04 +00:00
Ilya Goncharov 11b7c35eab All tasks related to typescript generation made configuration avoidance compatible
^KTI-1471 fixed
2023-11-14 16:53:23 +00:00
cristiangarcia 69c209874d Use cache-redirector to download Node.js for js.tests 2023-11-06 11:01:54 +01:00
Ilya Gorbunov eb813b7837 KT-62004 Drop legacy JS build of kotlin-test 2023-10-06 00:46:08 +00:00
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 0ecbb64c64 [Build] Remove testApiJUnit5 parameters
Instead of declaring additional dependencies inside the method, declare them directly
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Bogdan Mukvich 7b00323b89 [Build] Update guava
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Bogdan Mukvich dbb5072a26 [Build] Update dependencies
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Ilya Gorbunov a9bc8fa402 [stdlib-mpp] Exclude kotlin-stdlib-js/js-ir projects and use kotlin-stdlib instead
- Specify disambiguating attributes in kotlin-dom-api-compat
  compile dependency configurations
  because it uses the flag that removes JS compiler type attribute
  from all configurations and variants

  KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 69a87efdd9 js.tests: change paths to kotlin-stdlib-js.klib
Change the expected klib name of stdlib

KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov dcc71e77f3 [stdlib-mpp] Specify configuration attributes for stdlib-js variant disambiguation
#KT-56106
2023-08-03 14:47:20 +00:00
Artem Kobzar 08bd0d6ce1 [K/JS] Generate tests for K2 + ES-classes compilation 2023-08-01 09:16:20 +00:00
Yahor Berdnikau 73f6316f27 [repo] Enable warnings as errors for Gradle Kotlin scripts 2023-07-12 12:49:32 +00:00
Ilya Goncharov b0b266b73d [JS] Fix test of Ir Stdlib api 2023-06-29 14:25:45 +00:00
Alexander.Likhachev cb087b7def [Build] Bump gradle-node-plugin version to 5.0.0
This change is required to fix a configuration cache problem revealed after migration to Gradle 8.1
2023-06-26 10:36:25 +00:00
Alexander.Likhachev 407a2d4203 [Build] Remove usages of Provider.forUseAtConfigurationTime()
It's not required anymore and was deprecated since Gradle 7.4
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Artem Kobzar d2b64cd481 [K/JS] Generate .js files from .ts if they were not created, because of the incremental flag in tsconfig
The incremental option will prevent creating file if there is an incremental cache from TS compiler even if the file doesn't exist.
The situation could happen if `./gradlew clean` was executed (js file will be removed and ts incremental cache - not)

Merge-request: KT-MR-10229
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2023-06-14 09:26:18 +00:00
Dmitriy Novozhilov 7eca772ec2 [JS Test] Introduce tests for loading metadata produced by JS compiler 2023-06-07 10:58:01 +00:00
Artem Kobzar c7853c61b6 [K/JS] Make TS tests generating faster 2023-05-10 13:27:46 +00:00
Artem Kobzar c5b60a16bb [K/JS TESTS] Remove .ts files genereting from generateTests command to enable Gradle execution optimizations
Warning Context:
> Task :js:js.tests:generate-ts-for-regular-classes-in-exported-file
Execution optimizations have been disabled for task ':js:js.tests:generate-ts-for-regular-classes-in-exported-file' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: './js/js.translator/testData/typescript-export/regular-classes-in-exported-file'. Reason: Task ':js:js.tests:generate-ts-for-regular-classes-in-exported-file' uses this output of task ':js:js.tests:generate-js-export-on-file-for-regular-classes' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> generateTypeScriptTests
> tsc --build ./typescript-export/regular-classes-in-exported-file/tsconfig.json
2023-04-20 16:13:40 +00:00
Artem Kobzar 20dea37be0 [K/JS TEST] Run TestGenerated check on generated TS tests 2023-04-14 14:45:11 +00:00
Artem Kobzar 96a25b7b7d [K/JS TESTS] Migrate generating and running of invalidation tests to JUnit 5 2023-04-11 07:25:56 +00:00
Sergej Jaskiewicz c1ea3e7b53 [test] Give IrText test classes more descriptive names
The names now reflect the frontend and the backend used to run the tests
2023-03-22 15:18:15 +00:00
Artem Kobzar 7a79de6d16 [K/JS] Move JS IR box tests setup into separated function 2023-03-19 22:53:05 +00:00
Artem Kobzar e401c29c26 [K/JS] Add separate test configuration just for the ES6 test ^KTI-1098 Fixed 2023-02-02 11:35:05 +00:00
Svyatoslav Kuzmich bebb9b1392 [Wasm] Move compiler tests to :wasm:wasm.tests module
They don't belong in K/JS test module.
2023-01-31 13:12:12 +00:00
Zalim Bashorov 802a8ec326 [Wasm] Update SpiderMonkey version
#KT-56166 In-Progress
2023-01-27 17:57:50 +01:00
Alexander Korepanov 1ec88ff560 [JS IR] Enable IR dump for IC invalidation tests
Support 'fd.kotlin.js.debugMode' property in IC invalidation tests.
2023-01-24 09:35:15 +00:00
Vyacheslav Gerasimov 417fef0d58 Build: Change node directory in :js:js.tests project to build/node
#KTI-1087
2023-01-11 11:58:40 +00:00
Alexander.Likhachev 202fe9e41e [Build] Fix configuration cache issue on running :js:js.tests:test
#KT-55839 Fixed
2023-01-10 19:08:09 +00:00
Abduqodiri Qurbonzoda 4af0f110c7 Fix 'Test: stdlib-js public kotlin api test' IDEA run configuration
Moving tests to another package made the IDEA run configuration obsolete.
To prevent this problem in the future a separate task (jsStdlibApiTest)
was introduced. The task is run in TC and will fail if the tests are missing.

Merge-request: KT-MR-8128
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-01-07 12:30:52 +00:00
Artem Kobzar 97be632c9a [K/JS] Add @ts-ignore for the case when there is a class with a private primary constructor (or excluded from export) which has an exported subclass ^Fixed KT-52563 2023-01-04 15:21:40 +00:00
Vyacheslav Gerasimov 719cdce609 Build: Make mochaTest a VerificationTask to allow skipping it with flag
#KTI-1076
2022-12-22 18:45:41 +01:00
Vyacheslav Gerasimov 7348e34fd0 Build: Run only jsTests before mocha tests
Only js tests produce mocha tests to run
2022-12-22 18:45:40 +01:00
Vyacheslav Gerasimov ba81bd052f Build: Include missing tests in jsTest, jsIrTest, jsFirTest tasks
Some tests were included only in common :js:js.tests:test task and
 missing in specialized test tasks (jsTest, jsIrTest, jsFirTest)
2022-12-09 20:42:08 +01:00
Vyacheslav Gerasimov 7d0935a8c5 Build: Refactor :js:js.tests:runMocha task
Introduce separate mochaTest task without dependency on test task
2022-12-09 20:42:07 +01:00
Alexander Korepanov 9fcd185141 [JS IR] Set kotlin.js.test.root.out.dir for IC tests
Property kotlin.js.test.root.out.dir is required for
 JS IR IC tests, otherwise they can't be run from IDEA.
2022-11-28 16:13:10 +00:00
Anton Bannykh e42385dfb0 JS tests: split fir, ir, and legacy tests
Also split write FIR output to separate folders
2022-11-23 11:01:13 +00:00
Zalim Bashorov 10bf3b848e [JS & Wasm tests] Load properties from root local.properties file too 2022-11-11 16:21:54 +01:00
Sergej Jaskiewicz d16bbb1145 [JS] [tests] Look for properties in local.properties 2022-10-25 16:59:12 +00:00