|
| 1 | +import * as cache from '@actions/cache'; |
1 | 2 | import * as core from '@actions/core'; |
2 | 3 | import * as exec from '@actions/exec'; |
3 | | -import * as tc from '@actions/tool-cache'; |
4 | | -import * as cache from '@actions/cache'; |
5 | 4 | import * as io from '@actions/io'; |
| 5 | +import * as tc from '@actions/tool-cache'; |
6 | 6 |
|
7 | 7 | import fs from 'fs'; |
8 | | -import path from 'path'; |
9 | 8 | import osm from 'os'; |
| 9 | +import path from 'path'; |
10 | 10 |
|
11 | 11 | import each from 'jest-each'; |
12 | 12 |
|
| 13 | +import OfficialBuilds from '../src/distributions/official_builds/official_builds'; |
13 | 14 | import * as main from '../src/main'; |
14 | 15 | import * as util from '../src/util'; |
15 | | -import OfficialBuilds from '../src/distributions/official_builds/official_builds'; |
16 | 16 |
|
17 | 17 | describe('main tests', () => { |
18 | 18 | let inputs = {} as any; |
@@ -112,6 +112,8 @@ describe('main tests', () => { |
112 | 112 | ${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'} |
113 | 113 | ${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}}'} | ${'22.0.0'} |
114 | 114 | ${'{"devEngines": {"runtime": [{"name": "bun"}, {"name": "node", "version": "22.0.0"}]}}'} | ${'22.0.0'} |
| 115 | + ${'[tools]\ngo="latest"\nnode = "24.10"'} | ${'24.10'} |
| 116 | + ${'[tools]\nnode = "22.12"'} | ${'22.12'} |
115 | 117 | `.it('parses "$contents"', ({contents, expected}) => { |
116 | 118 | const existsSpy = jest.spyOn(fs, 'existsSync'); |
117 | 119 | existsSpy.mockImplementation(() => true); |
|
0 commit comments