Skip to content

Commit ef8f040

Browse files
committed
Get typings from npm package
1 parent fd1f2c3 commit ef8f040

File tree

5 files changed

+14
-24
lines changed

5 files changed

+14
-24
lines changed

__data__/dotnetFormatMatcher.ts

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

__tests__/problemMatcher.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { matchResults } from "../__helpers__/utils";
2-
import { dotnetFormatMatcher, ProblemMatcherPattern } from "../__data__/dotnetFormatMatcher";
2+
import { problemMatcher as problemMatcherJson } from "../.github/dotnet-format-problem-matcher.json";
3+
import { ProblemMatcher, ProblemPattern } from "github-actions-problem-matcher-typings";
4+
5+
const problemMatcher = problemMatcherJson[0] as ProblemMatcher;
36

47
describe("problemMatcher", () => {
58
it("has one pattern", () => {
6-
expect(dotnetFormatMatcher.pattern.length).toEqual(1);
9+
expect(problemMatcher.pattern.length).toEqual(1);
710
});
811

912
describe("pattern", () => {
@@ -15,11 +18,11 @@ describe("problemMatcher", () => {
1518
" Format complete in 4451ms.",
1619
];
1720

18-
let pattern: ProblemMatcherPattern;
21+
let pattern: ProblemPattern;
1922
let regexp: RegExp;
2023

2124
beforeEach(() => {
22-
pattern = dotnetFormatMatcher.pattern[0];
25+
pattern = problemMatcher.pattern[0];
2326
regexp = new RegExp(pattern.regexp);
2427
});
2528

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@types/jest": "^25.1.2",
2828
"@types/node": "^13.7.1",
2929
"@zeit/ncc": "^0.21.1",
30+
"github-actions-problem-matcher-typings": "^1.0.0",
3031
"jest": "^25.1.0",
3132
"jest-circus": "^25.1.0",
3233
"ts-jest": "^25.2.0",

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
},
6363
"exclude": [
6464
"node_modules",
65-
"__data__",
6665
"__helpers__",
6766
"__tests__"
6867
]

0 commit comments

Comments
 (0)