You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,17 +29,29 @@ The tests for this project can be executed using the standard `npm test`. This r
29
29
30
30
Due to the time required to run all tests, it is impractical to run every test while developing part of the transpiler. To speed up the test run you can:
31
31
32
-
- Use `npm test -- --watchAll` to start tests and rerun them on change
33
-
- Use `npm test name` or interactive watching interface to run tests that match a file name pattern
34
-
- Add `.only` to test definition to run a single test in the file
32
+
- Use `npm test name` to run tests that match a file name pattern
33
+
34
+
- Use `npm test -- --watchAll [name]` to start tests and rerun them on change
35
+
36
+
- Check out `Watch Usage` in the watching interface to get information about filtering tests without restarting CLI
37
+
38
+
- Use `.only` and `.skip` to filter executed tests in the file
39
+
40
+
```ts
41
+
// Skipped
42
+
test("test", () => {});
43
+
44
+
// Executed
45
+
test.only("test", () => {});
46
+
```
35
47
36
48
## Testing Guidelines
37
49
When submitting a pull request with new functionality, we require some functional (transpile and execute Lua) to be added, to ensure the new functionality works as expected, and will continue to work that way.
38
50
39
51
Translation tests are discouraged as in most cases as we do not really care about the exact Lua output, as long as executing it results in the correct result (which is tested by functional tests).
40
52
41
53
## Coding Conventions
42
-
Most coding conventions are enforced by the TSLint and Prettier. You can check your code locally by running `npm run lint`. CI process will fail if code does not pass the linter. You also might want to get extensions for your code editor to get immediate feedback.
54
+
Most coding conventions are enforced by the TSLint and Prettier. You can check your code locally by running `npm run lint`. The CI build will fail if your code does not pass the linter. For better experience, you can install extensions for your code editor for [TSLint](https://palantir.github.io/tslint/usage/third-party-tools/) and [Prettier](https://prettier.io/docs/en/editors.html).
43
55
44
56
Some extra conventions worth mentioning:
45
57
* Do not abbreviate variable names. The exception here are inline lambda arguments, if it is obvious what the argument is you can abbreviate to the first letter, e.g: `statements.filter(s => ts.VariableStatement(s))`
0 commit comments