Skip to content

Commit 7fe1921

Browse files
committed
Change test directory in configs
1 parent cc07dce commit 7fe1921

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/dist
22
/coverage
3-
/__tests__/compiler/testfiles/invalid_syntax.ts
3+
/test/compiler/testfiles/invalid_syntax.ts
44

55
/src
66
*.md

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ To get familiar with the project structure, here is a short overview of each dir
1717
* *LuaTransformer.ts* - Main transpiler code, transforms a TypeScript AST to a Lua AST.
1818
* *LuaPrinter.ts* - Transforms a Lua AST to a string.
1919
* *TSHelper.ts* - Helper methods used during the transpilation process.
20-
- `__tests__/`
20+
- `test/`
2121
* This directory contains all testing code for the transpiler.
22-
* `__tests__/unit/`
22+
* `test/unit/`
2323
- Unit/Functional tests for the transpiler. Tests in here are grouped by functionality they are testing. Generally each of these tests uses the transpiler to transpile some TypeScript to Lua, then executes it using the Fengari Lua VM. Assertion is done on the result of the lua code.
24-
* `__tests__/translation/`
24+
* `test/translation/`
2525
- **[Obsolete]** Contains tests that only check the transpiled Lua String. We prefer adding unit/functional tests over translation tests. This directory will probably be removed at some point.
2626

2727
## Running Tests

jest.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
const isCI = require("is-ci");
33

44
/** @type {Partial<import('@jest/types').Config.DefaultOptions>} */
5-
module.exports = {
6-
testMatch: ["**/__tests__/**/*.test.ts"],
5+
const config = {
6+
testMatch: ["**/test/**/*.spec.ts"],
77
collectCoverageFrom: ["<rootDir>/src/**/*", "!<rootDir>/src/lualib/**/*"],
88
watchPathIgnorePatterns: ["/watch\\.ts$"],
99

@@ -12,8 +12,10 @@ module.exports = {
1212
preset: "ts-jest",
1313
globals: {
1414
"ts-jest": {
15-
tsConfig: "<rootDir>/__tests__/tsconfig.json",
15+
tsConfig: "<rootDir>/test/tsconfig.json",
1616
diagnostics: { warnOnly: !isCI },
1717
},
1818
},
1919
};
20+
21+
module.exports = config;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"test-fast": "cross-env JEST_IGNORE_DIAGNOSTICS=true jest",
2424
"lint": "npm run lint:tslint && npm run lint:prettier",
2525
"lint:prettier": "prettier --check **/*.{js,ts,yml,json}",
26-
"lint:tslint": "tslint -p . && tslint -p __tests__ && tslint src/lualib/*.ts",
26+
"lint:tslint": "tslint -p . && tslint -p test && tslint src/lualib/*.ts",
2727
"release-major": "npm version major",
2828
"release-minor": "npm version minor",
2929
"release-patch": "npm version patch",

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./__tests__/tslint.json",
2+
"extends": "./test/tslint.json",
33
"rules": {
44
"arrow-parens": [true, "ban-single-arg-parens"],
55
"import-spacing": true,

0 commit comments

Comments
 (0)