-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.codiumai.toml
106 lines (91 loc) · 4.2 KB
/
.codiumai.toml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#.codiumai.toml
[tests]
## Testing framework to use - this can affect the content of the generated types
## as well as the test run command.
## Possible values are:
## Python: Pytest, Unittest
## Javascript / Typescript: Jest, Mocha, Vitest, Karma, Jasmine, QUnit, React Testing Library
## HOWEVER: running types in JS / TS is at the moment only supported
## for Jest, Mocha, Vitest, and React Testing Library
# framework = "Kotlin Test"
## An additional Javascript utility library used to test your code, if any.
## Possible values are None, Testing Library, Enzyme, or Chai. Not applicable to Python projects.
# utility_library = "Testing Library"
## A hint to the test generator about whether to use mocks or not. Possible values are true or false.
# use_mocks = false
## How many types should be generated by default. Fewer types is faster.
## Does not apply at the moment to extend-suite types.
num_desired_tests = 10
## A multiline string, delimited with triple-quotes (""") serving as an extra instruction
## that the AI model will take into consideration.
## This will appear as "General instructions" in the
## configuration section in the types panel.
plan_instructions = """
Use kotlin("test")'s framework for kotlin tests
"""
## A multiline string, delimited with triple-quotes (""") serving as an example test that represents
## what you would like the generated types to look like in terms of style, setup, etc.
example_test = """
@Test
fun verify_type_erasure_with_generic_parameters() {
val union = Union.of<String, Int>("test")
assertTrue(union.isFirst())
assertFalse(union.isSecond())
assertEquals("test", union.getFirst())
val unionInt = Union.of<String, Int>(42)
assertFalse(unionInt.isFirst())
assertTrue(unionInt.isSecond())
assertEquals(42, unionInt.getSecond())
assertFailsWith(IllegalArgumentException::class) {
Union.of<String, Int>(3.14)
}
}
"""
[tests.javascript]
## When running Javascript / Typescript types, use this directory as the test process "current working directory".
## This is a path relative to the location of the config file.
## Default: The directory containing the config file.
## Note: the typical setup is to place the config file in the same directory as the relevant 'package.json' file,
## and leave this commented-out.
# overrideTestRunCwd = "./test"
## This is the command that's used to run types.
## PLEASE READ CAREFULLY:
##
## When running types, Qodo Gen generates a temporary file that contains the test code for a single test,
## and runs that file.
## When the types are done, the temporary file is deleted.
## For component-oriented types (when you click "test this class" or "test this function"), the temporary file
## is created next to the file being tested.
## For extend-suite types (when you click "add more types" on a test-suite), the temporary file is created next
## to the test-suite file.
##
## Typically, you're going to want to take the test script defined in your package.json file, and tweak it a
## little to make it compatible with Qodo Gen.
##
## You almost always want to start with 'npx' (e.g. 'npx jest', not 'npm jest' or 'yarn test').
##
## Note that the test command must be able to run test files that are located in the same directory as the
## file under test.
## A common issue is that the test command in the package.json file selects only from
## a "types" directory, causing the Qodo Gen types be "not found" - please remove any such restriction from
## the command / configuration.
##
## The placeholder TEST_FILEPATH will be replaced with the actual test file path - this is how we find
## the file to run.
##
## EXAMPLES:
## Mocha:
## npx ts-mocha TEST_FILEPATH --require ./test/mocha/setup.ts
## Jest:
## npx jest --runTestsByPath TEST_FILEPATH
##
## DEBUGGING NOTE:
## To help debug run-types issues, you can view run logs in vscode's OUTPUT
## (select codium-ai from the dropdown).
## It's helpful to clear the output (right-click -> clear) and then run the types again.
##
# overrideTestRunScript = "npx jest --runTestsByPath TEST_FILEPATH"
## A multiline string, delimited with triple-quotes ("""),
## containing import declaration to use in each test file.
# overrideImports = """
# import {expect} from 'chai'; """