aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/index/java-test/init.lua
blob: 63dc3578c305925b7e8e759baabe2eeea2684087 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local Pkg = require "mason-core.package"
local _ = require "mason-core.functional"
local github = require "mason-core.managers.github"
local path = require "mason-core.path"

return Pkg.new {
    name = "java-test",
    desc = _.dedent [[
        The Test Runner for Java works with java-debug-adapter to provide the following features:
        - Run/Debug test cases
        - Customize test configurations
        - View test report
        - View tests in Test Explorer

        Enables support for the following test frameworks:

        - JUnit 4 (v4.8.0+)
        - JUnit 5 (v5.1.0+)
        - TestNG (v6.8.0+)
    ]],
    homepage = "https://github.com/microsoft/vscode-java-test",
    languages = { Pkg.Lang.Java },
    categories = { Pkg.Cat.DAP },
    ---@async
    ---@param ctx InstallContext
    install = function(ctx)
        github
            .unzip_release_file({
                repo = "microsoft/vscode-java-test",
                asset_file = _.format "vscjava.vscode-java-test-%s.vsix",
            })
            .with_receipt()

        ctx.fs:rmrf(path.concat { "extension", "resources" })
        ctx.fs:rmrf(path.concat { "extension", "dist" })
    end,
}