Skip to content

Commit f8b1ab8

Browse files
authored
Merge pull request #30 from Software-Developers-IRL/f/lastlink
move tests, clone submodule in github action
2 parents b580de2 + 73672a5 commit f8b1ab8

File tree

8 files changed

+166
-11
lines changed

8 files changed

+166
-11
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15+
with:
16+
submodules: true
1517
- uses: actions/setup-node@v3
1618
with:
1719
node-version: current

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ dist
105105
lib
106106
deps/mermaid
107107
samples/output.md
108+
junit.xml

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
2626
"args": [
2727
"-c",
28-
"./jest.config.js",
28+
"./jest.config.ts",
2929
"--verbose",
3030
"-i",
3131
"--no-cache"
@@ -40,7 +40,7 @@
4040
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
4141
"args": [
4242
"-c",
43-
"./jest.config.js",
43+
"./jest.config.ts",
4444
"--verbose",
4545
"-i",
4646
"--no-cache",

jest.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

jest.config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import type { Config } from "jest";
2+
3+
const config: Config = {
4+
verbose: true,
5+
globals: {
6+
"ts-jest": {
7+
tsConfig: "tsconfig.json",
8+
},
9+
},
10+
moduleFileExtensions: ["ts", "js"],
11+
transform: {
12+
"^.+\\.(ts|tsx)$": "ts-jest",
13+
},
14+
testMatch: ["**/tests/**/*.spec.(ts|js)"],
15+
// runner: "jest-serial-runner",
16+
// testEnvironment: "node",
17+
reporters: ["default", "jest-junit"],
18+
collectCoverageFrom: ["src/**/*.{ts,js}", "!**/node_modules/**", "!**/lib/**"]
19+
};
20+
21+
export default config;
22+
23+
// module.exports = {
24+
// // [...]
25+
// // Replace `ts-jest` with the preset you want to use
26+
// // from the above list
27+
// preset: 'ts-jest'
28+
// };

package-lock.json

Lines changed: 130 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"dompurify": "2.4.0",
4444
"eslint": "^8.23.1",
4545
"jest": "^29.0.3",
46+
"jest-junit": "^12.0.0",
47+
"jest-serial-runner": "^1.1.0",
4648
"ts-jest": "^29.0.1",
4749
"ts-node": "^10.9.1",
4850
"typescript": "^4.8.3"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Parser } from "./generate-sql-ddl";
1+
import { Parser } from "../src/generate-sql-ddl";
22

33
describe("Generate DDL examples", () => {
44
it("Should generate create table SQL syntax", () => {

0 commit comments

Comments
 (0)