Skip to content

Commit 93164ff

Browse files
committed
Add tests
1 parent 45c425f commit 93164ff

19 files changed

+15835
-4011
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
"no-throw-literal": "warn",
2323
"semi": "off"
2424
},
25-
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
25+
"ignorePatterns": ["out", "dist", "test", "**/*.d.ts"]
2626
}

.github/workflows/main.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,33 @@ jobs:
1313
name: Build
1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Use Node ${{ matrix.node-version }}
16+
- name: Setup Node.js
1717
uses: actions/[email protected]
1818
with:
1919
node-version: 16
20+
- name: Setup dotnet
21+
uses: actions/setup-dotnet@v3
22+
with:
23+
dotnet-version: '7.x.x'
2024
- name: Install NPM Packages
2125
run: npm ci
2226
- name: Lint
2327
run: npm run lint
2428
- name: Build
2529
run: npm run package
30+
- name: Prepare test project
31+
run: |
32+
dotnet tool restore
33+
dotnet build
34+
dotnet ef --version
35+
dotnet ef dbcontext list --project "ExampleAPI" --no-color --json
36+
working-directory: ./sample_dotnet
37+
- name: Test
38+
run: |
39+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
40+
npm test
41+
env:
42+
DISPLAY: ':99.0'
2643

2744
publish:
2845
name: Publish

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules
44
.vscode-test/
55
*.vsix
66
.DS_Store
7+
.wdio-vscode-service

.prettierignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules
22
.vscode-test
33
package-lock.json
4-
dist/
5-
sample_dotnet/
4+
dist
5+
sample_dotnet
6+
.wdio-vscode-service
7+
out

.vscode/launch.json

+4-10
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,11 @@
1111
},
1212
{
1313
"name": "Extension Tests",
14-
"type": "extensionHost",
1514
"request": "launch",
16-
"args": [
17-
"--extensionDevelopmentPath=${workspaceFolder}",
18-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
19-
],
20-
"outFiles": [
21-
"${workspaceFolder}/out/**/*.js",
22-
"${workspaceFolder}/dist/**/*.js"
23-
],
24-
"preLaunchTask": "tasks: watch-tests"
15+
"runtimeArgs": ["run-script", "wdio"],
16+
"runtimeExecutable": "npm",
17+
"skipFiles": ["<node_internals>/**"],
18+
"type": "node"
2519
}
2620
]
2721
}

.vscode/settings.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
"entityframework",
5454
"NLCR",
5555
"Pseudoterminal",
56-
"richardwillis"
56+
"richardwillis",
57+
"Testrunner",
58+
"waitfor",
59+
"wdio",
60+
"Xvfb"
5761
]
5862
}

0 commit comments

Comments
 (0)