Skip to content

Commit 299ff0d

Browse files
committed
Update tests to reflect available release version
1 parent e8fb018 commit 299ff0d

File tree

2 files changed

+13
-339
lines changed

2 files changed

+13
-339
lines changed

__tests__/main.test.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,8 @@ describe("installer tests", () => {
4343
});
4444

4545
it("Downloads version of arduino-lint if no matching version is installed", async () => {
46-
const toolPath = await installer.getArduinoLint("0.4.0");
47-
const bindir = path.join(
48-
toolDir,
49-
"arduino-lint",
50-
"0.4.0",
51-
os.arch(),
52-
"arduino-lint"
53-
);
46+
const toolPath = await installer.getArduinoLint("1.0.0");
47+
const bindir = path.join(toolDir, "arduino-lint", "1.0.0", os.arch());
5448

5549
expect(toolPath == path.join(bindir, "arduino-lint")).toBe(true);
5650
expect(fs.existsSync(`${bindir}.complete`)).toBe(true);
@@ -79,9 +73,9 @@ describe("installer tests", () => {
7973
jest.clearAllMocks();
8074
});
8175

82-
it("Gets the latest version of arduino-lint 0.4.0 using 0.4 and no matching version is installed", async () => {
83-
await installer.getArduinoLint("0.4");
84-
const bindir = path.join(toolDir, "arduino-lint", "0.4.0", os.arch());
76+
it("Gets the latest version of arduino-lint 1.0.0 using 1.0 and no matching version is installed", async () => {
77+
await installer.getArduinoLint("1.0");
78+
const bindir = path.join(toolDir, "arduino-lint", "1.0.0", os.arch());
8579

8680
expect(fs.existsSync(`${bindir}.complete`)).toBe(true);
8781
if (IS_WINDOWS) {
@@ -91,9 +85,9 @@ describe("installer tests", () => {
9185
}
9286
}, 20000);
9387

94-
it("Gets latest version of the 0 major series using 0.x and no matching version is installed", async () => {
95-
await installer.getArduinoLint("0.x");
96-
const bindir = path.join(toolDir, "arduino-lint", "0.5.0", os.arch());
88+
it("Gets latest version of the 1 major series using 1.x and no matching version is installed", async () => {
89+
await installer.getArduinoLint("1.x");
90+
const bindir = path.join(toolDir, "arduino-lint", "1.0.0", os.arch());
9791

9892
expect(fs.existsSync(`${bindir}.complete`)).toBe(true);
9993
if (IS_WINDOWS) {

__tests__/testdata/tags.json

Lines changed: 5 additions & 325 deletions
Original file line numberDiff line numberDiff line change
@@ -1,332 +1,12 @@
11
[
22
{
3-
"ref": "refs/tags/builder-0.1",
4-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmJ1aWxkZXItMC4x",
5-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/builder-0.1",
3+
"ref": "refs/tags/1.0.0",
4+
"node_id": "MDM6UmVmMjk1NTczODg1OnJlZnMvdGFncy8xLjAuMA==",
5+
"url": "https://github.com/api/repos/arduino/arduino-lint/git/refs/tags/1.0.0",
66
"object": {
7-
"sha": "d8a03c228c54d9968fa8f1f3cb5182887107db59",
7+
"sha": "e6edeaedb6578a8a2db54725584ba07eb9ce28a4",
88
"type": "tag",
9-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/d8a03c228c54d9968fa8f1f3cb5182887107db59"
10-
}
11-
},
12-
{
13-
"ref": "refs/tags/drone-0.0.0",
14-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMC4w",
15-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.0.0",
16-
"object": {
17-
"sha": "c27f820c8cf244907335aef42f623cd2d611afcf",
18-
"type": "tag",
19-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/c27f820c8cf244907335aef42f623cd2d611afcf"
20-
}
21-
},
22-
{
23-
"ref": "refs/tags/drone-0.0.1",
24-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMC4x",
25-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.0.1",
26-
"object": {
27-
"sha": "adeb4d57fe14e43ff18e9b025720e02305e12ae4",
28-
"type": "tag",
29-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/adeb4d57fe14e43ff18e9b025720e02305e12ae4"
30-
}
31-
},
32-
{
33-
"ref": "refs/tags/drone-0.0.2",
34-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMC4y",
35-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.0.2",
36-
"object": {
37-
"sha": "3741fae2c8e6de3a95c7f4351ee516615596c305",
38-
"type": "tag",
39-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/3741fae2c8e6de3a95c7f4351ee516615596c305"
40-
}
41-
},
42-
{
43-
"ref": "refs/tags/drone-0.0.3",
44-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMC4z",
45-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.0.3",
46-
"object": {
47-
"sha": "8c56a4c632902e69ff1a394d314cc4babcb56de4",
48-
"type": "tag",
49-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/8c56a4c632902e69ff1a394d314cc4babcb56de4"
50-
}
51-
},
52-
{
53-
"ref": "refs/tags/drone-0.1.0",
54-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMS4w",
55-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.1.0",
56-
"object": {
57-
"sha": "8fb92a347fae53021e382a8957e1a8890864ec85",
58-
"type": "tag",
59-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/8fb92a347fae53021e382a8957e1a8890864ec85"
60-
}
61-
},
62-
{
63-
"ref": "refs/tags/drone-0.1.1",
64-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMS4x",
65-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.1.1",
66-
"object": {
67-
"sha": "303b433d235b1d620f6c455b35874eb543f41e7f",
68-
"type": "tag",
69-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/303b433d235b1d620f6c455b35874eb543f41e7f"
70-
}
71-
},
72-
{
73-
"ref": "refs/tags/drone-0.1.2",
74-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMS4y",
75-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.1.2",
76-
"object": {
77-
"sha": "e7808386f587562d3997a6fe1e0938ea9656bd08",
78-
"type": "tag",
79-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/e7808386f587562d3997a6fe1e0938ea9656bd08"
80-
}
81-
},
82-
{
83-
"ref": "refs/tags/drone-0.2.0",
84-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMi4w",
85-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.2.0",
86-
"object": {
87-
"sha": "5bc32cac07f40a33a08a7071b847ae7f9c629bc4",
88-
"type": "tag",
89-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/5bc32cac07f40a33a08a7071b847ae7f9c629bc4"
90-
}
91-
},
92-
{
93-
"ref": "refs/tags/drone-0.2.1",
94-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTAuMi4x",
95-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-0.2.1",
96-
"object": {
97-
"sha": "97832143d3c5ec2b0ecb49694d1ab4c411bb9d0e",
98-
"type": "tag",
99-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/97832143d3c5ec2b0ecb49694d1ab4c411bb9d0e"
100-
}
101-
},
102-
{
103-
"ref": "refs/tags/drone-1.0",
104-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTEuMA==",
105-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-1.0",
106-
"object": {
107-
"sha": "57bc5199ff667f89b2f882732456e2ff5faf6a2c",
108-
"type": "tag",
109-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/57bc5199ff667f89b2f882732456e2ff5faf6a2c"
110-
}
111-
},
112-
{
113-
"ref": "refs/tags/drone-1.1.0",
114-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOmRyb25lLTEuMS4w",
115-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/drone-1.1.0",
116-
"object": {
117-
"sha": "fcc79869ad774bdc1c7ee841e595005d1dc9fce1",
118-
"type": "tag",
119-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/fcc79869ad774bdc1c7ee841e595005d1dc9fce1"
120-
}
121-
},
122-
{
123-
"ref": "refs/tags/test_tag",
124-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOnRlc3RfdGFn",
125-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/test_tag",
126-
"object": {
127-
"sha": "4c30efaa5ec32e9e5bb5689d65269583f78ab6be",
128-
"type": "tag",
129-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/4c30efaa5ec32e9e5bb5689d65269583f78ab6be"
130-
}
131-
},
132-
{
133-
"ref": "refs/tags/0.1.0-alpha.preview",
134-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMS4wLWFscGhhLnByZXZpZXc=",
135-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.1.0-alpha.preview",
136-
"object": {
137-
"sha": "f46fc3f50c3ec47442ef7296f1cf87e5e2cf474b",
138-
"type": "commit",
139-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/commits/f46fc3f50c3ec47442ef7296f1cf87e5e2cf474b"
140-
}
141-
},
142-
{
143-
"ref": "refs/tags/0.2.0-alpha.preview",
144-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMi4wLWFscGhhLnByZXZpZXc=",
145-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.2.0-alpha.preview",
146-
"object": {
147-
"sha": "f44aaa57eecbf4e7df1bbcb597e596152e06023a",
148-
"type": "commit",
149-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/commits/f44aaa57eecbf4e7df1bbcb597e596152e06023a"
150-
}
151-
},
152-
{
153-
"ref": "refs/tags/0.2.1-alpha.preview",
154-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMi4xLWFscGhhLnByZXZpZXc=",
155-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.2.1-alpha.preview",
156-
"object": {
157-
"sha": "55f05b9b57de399019594deba10926c5b7ba4402",
158-
"type": "commit",
159-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/commits/55f05b9b57de399019594deba10926c5b7ba4402"
160-
}
161-
},
162-
{
163-
"ref": "refs/tags/0.2.2-alpha.preview",
164-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMi4yLWFscGhhLnByZXZpZXc=",
165-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.2.2-alpha.preview",
166-
"object": {
167-
"sha": "cc68e6442ddbc2b5f17c312b2d06840902ba1715",
168-
"type": "tag",
169-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/cc68e6442ddbc2b5f17c312b2d06840902ba1715"
170-
}
171-
},
172-
{
173-
"ref": "refs/tags/0.3.0-alpha.preview",
174-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy4wLWFscGhhLnByZXZpZXc=",
175-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.0-alpha.preview",
176-
"object": {
177-
"sha": "e42a18a5d7e558fd5db0a96ca35588c75b058f47",
178-
"type": "tag",
179-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/e42a18a5d7e558fd5db0a96ca35588c75b058f47"
180-
}
181-
},
182-
{
183-
"ref": "refs/tags/0.3.1-alpha.preview",
184-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy4xLWFscGhhLnByZXZpZXc=",
185-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.1-alpha.preview",
186-
"object": {
187-
"sha": "616251615c876f666b5183dfa9e25d33a2ac1470",
188-
"type": "tag",
189-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/616251615c876f666b5183dfa9e25d33a2ac1470"
190-
}
191-
},
192-
{
193-
"ref": "refs/tags/0.3.2-alpha.preview",
194-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy4yLWFscGhhLnByZXZpZXc=",
195-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.2-alpha.preview",
196-
"object": {
197-
"sha": "f7b379fc22e71574b688ec7c7b730f314d6a2a7f",
198-
"type": "tag",
199-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/f7b379fc22e71574b688ec7c7b730f314d6a2a7f"
200-
}
201-
},
202-
{
203-
"ref": "refs/tags/0.3.3-alpha.preview",
204-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy4zLWFscGhhLnByZXZpZXc=",
205-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.3-alpha.preview",
206-
"object": {
207-
"sha": "99febb216d951e3e8fa766920d08d8c8926da265",
208-
"type": "tag",
209-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/99febb216d951e3e8fa766920d08d8c8926da265"
210-
}
211-
},
212-
{
213-
"ref": "refs/tags/0.3.4-alpha.preview",
214-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy40LWFscGhhLnByZXZpZXc=",
215-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.4-alpha.preview",
216-
"object": {
217-
"sha": "5212732f34956e4ccb4bf7b86b9c09d6392bbdca",
218-
"type": "tag",
219-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/5212732f34956e4ccb4bf7b86b9c09d6392bbdca"
220-
}
221-
},
222-
{
223-
"ref": "refs/tags/0.3.5-alpha.preview",
224-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy41LWFscGhhLnByZXZpZXc=",
225-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.5-alpha.preview",
226-
"object": {
227-
"sha": "33e1e668efcb1be3103e2e4625c08578ad034363",
228-
"type": "tag",
229-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/33e1e668efcb1be3103e2e4625c08578ad034363"
230-
}
231-
},
232-
{
233-
"ref": "refs/tags/0.3.6-alpha.preview",
234-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy42LWFscGhhLnByZXZpZXc=",
235-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.6-alpha.preview",
236-
"object": {
237-
"sha": "03cf35ec360073ce71006c7f45946ef8c33dbb76",
238-
"type": "tag",
239-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/03cf35ec360073ce71006c7f45946ef8c33dbb76"
240-
}
241-
},
242-
{
243-
"ref": "refs/tags/0.3.7-alpha.preview",
244-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuMy43LWFscGhhLnByZXZpZXc=",
245-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.3.7-alpha.preview",
246-
"object": {
247-
"sha": "4bd22aa88398c3fde089525d0fa7e51d533f296f",
248-
"type": "tag",
249-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/4bd22aa88398c3fde089525d0fa7e51d533f296f"
250-
}
251-
},
252-
{
253-
"ref": "refs/tags/0.4.0-armv6",
254-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNC4wLWFybXY2",
255-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.4.0-armv6",
256-
"object": {
257-
"sha": "dc3d90671a7ac1ce7afdb46f851badc689a23eda",
258-
"type": "tag",
259-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/dc3d90671a7ac1ce7afdb46f851badc689a23eda"
260-
}
261-
},
262-
{
263-
"ref": "refs/tags/0.4.0-rc1",
264-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNC4wLXJjMQ==",
265-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.4.0-rc1",
266-
"object": {
267-
"sha": "01b66b5b75323be9ef2368f7d7f9d387eefd5207",
268-
"type": "tag",
269-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/01b66b5b75323be9ef2368f7d7f9d387eefd5207"
270-
}
271-
},
272-
{
273-
"ref": "refs/tags/0.4.0",
274-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNC4w",
275-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.4.0",
276-
"object": {
277-
"sha": "57e6abb0c4476d5ee5c2651229f6cf68fb81f60b",
278-
"type": "tag",
279-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/57e6abb0c4476d5ee5c2651229f6cf68fb81f60b"
280-
}
281-
},
282-
{
283-
"ref": "refs/tags/0.5.0-preview1",
284-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNS4wLXByZXZpZXcx",
285-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.5.0-preview1",
286-
"object": {
287-
"sha": "95c7e9d4b39a4d2f53a624c9b98a4313d61bd54e",
288-
"type": "commit",
289-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/commits/95c7e9d4b39a4d2f53a624c9b98a4313d61bd54e"
290-
}
291-
},
292-
{
293-
"ref": "refs/tags/0.5.0-preview2",
294-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNS4wLXByZXZpZXcy",
295-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.5.0-preview2",
296-
"object": {
297-
"sha": "69822d188e95a0f9a4276c3e0651db1d2774c375",
298-
"type": "commit",
299-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/commits/69822d188e95a0f9a4276c3e0651db1d2774c375"
300-
}
301-
},
302-
{
303-
"ref": "refs/tags/0.5.0-rc1",
304-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNS4wLXJjMQ==",
305-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.5.0-rc1",
306-
"object": {
307-
"sha": "bb24a8f962c2e689ed32a08533f205ed03785704",
308-
"type": "tag",
309-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/bb24a8f962c2e689ed32a08533f205ed03785704"
310-
}
311-
},
312-
{
313-
"ref": "refs/tags/0.5.0-rc2",
314-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNS4wLXJjMg==",
315-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.5.0-rc2",
316-
"object": {
317-
"sha": "4ce9bf0279f7aa03b25eba4b2d7c8a74cbd96846",
318-
"type": "tag",
319-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/4ce9bf0279f7aa03b25eba4b2d7c8a74cbd96846"
320-
}
321-
},
322-
{
323-
"ref": "refs/tags/0.5.0",
324-
"node_id": "MDM6UmVmMTQ0MDM2ODMzOjAuNS4w",
325-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/refs/tags/0.5.0",
326-
"object": {
327-
"sha": "b9341da9ff55f7315fe70cd0ab88866d691baa5f",
328-
"type": "tag",
329-
"url": "https://github.com/api/repos/arduino/arduino-cli/git/tags/b9341da9ff55f7315fe70cd0ab88866d691baa5f"
9+
"url": "https://github.com/api/repos/arduino/arduino-lint/git/tags/e6edeaedb6578a8a2db54725584ba07eb9ce28a4"
33010
}
33111
}
33212
]

0 commit comments

Comments
 (0)