Skip to content

Commit d3edb7a

Browse files
committed
chore: eslint fixups
chore: bump actions versions
1 parent 4566129 commit d3edb7a

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ jobs:
1616

1717
steps:
1818
- name: Checkout Repo
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Install Node
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
2424
node-version: ${{ matrix.node }}
25+
cache: 'npm'
2526

2627
- run: npm ci
2728

test/problemMatcher.test.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import {
99
} from 'vitest';
1010

1111
import problemMatcherData from '../.github/problem-matcher.json';
12-
const problemMatcher = problemMatcherData.problemMatcher[0];
13-
1412
import htmllintProblemMatcher from '../src/index';
1513

14+
const problemMatcher = problemMatcherData.problemMatcher[0];
1615
const matchResults = function(string, regexp) {
1716
return string.map(line => regexp.exec(line));
1817
};
@@ -88,29 +87,29 @@ describe('loads JS', () => {
8887
});
8988

9089
it('throws with no input', async () => {
91-
await expect(htmllintProblemMatcher()).rejects.toThrowError(`Unsupported action ""`);
90+
await expect(htmllintProblemMatcher()).rejects.toThrowError('Unsupported action ""');
9291
});
9392
});
9493

9594
describe('throws with invalid action', () => {
9695
beforeAll(() => {
97-
process.env['INPUT_ACTION'] = 'foo';
96+
process.env.INPUT_ACTION = 'foo';
9897
});
9998
afterAll(() => {
100-
delete process.env['INPUT_ACTION'];
99+
delete process.env.INPUT_ACTION;
101100
});
102101

103102
it('throws with invalid action', async () => {
104-
await expect(htmllintProblemMatcher()).rejects.toThrowError(`Unsupported action "foo"`);
103+
await expect(htmllintProblemMatcher()).rejects.toThrowError('Unsupported action "foo"');
105104
});
106105
});
107106

108107
describe('adds matcher', () => {
109108
beforeAll(() => {
110-
process.env['INPUT_ACTION'] = 'add';
109+
process.env.INPUT_ACTION = 'add';
111110
});
112111
afterAll(() => {
113-
delete process.env['INPUT_ACTION'];
112+
delete process.env.INPUT_ACTION;
114113
});
115114

116115
it('adds the matcher', async () => {
@@ -130,15 +129,16 @@ describe('adds matcher', () => {
130129
}
131130
}
132131
expect(hasMatch).toBe(true);
132+
logMock.mockRestore();
133133
});
134134
});
135135

136136
describe('removes matcher', () => {
137137
beforeAll(() => {
138-
process.env['INPUT_ACTION'] = 'remove';
138+
process.env.INPUT_ACTION = 'remove';
139139
});
140140
afterAll(() => {
141-
delete process.env['INPUT_ACTION'];
141+
delete process.env.INPUT_ACTION;
142142
});
143143

144144
it('removes the matcher', async () => {
@@ -158,5 +158,6 @@ describe('removes matcher', () => {
158158
}
159159
}
160160
expect(hasMatch).toBe(true);
161+
logMock.mockRestore();
161162
});
162163
});

0 commit comments

Comments
 (0)