mirror of
https://github.com/actions/setup-node.git
synced 2025-07-02 07:33:47 +00:00
initial logic
This commit is contained in:
parent
8c91899e58
commit
06981c41e3
6 changed files with 224 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
import os = require('os');
|
||||
import os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as core from '@actions/core';
|
||||
|
|
|
@ -6,7 +6,7 @@ import * as im from '../src/installer';
|
|||
import * as cache from '@actions/cache';
|
||||
import fs from 'fs';
|
||||
import cp from 'child_process';
|
||||
import osm = require('os');
|
||||
import osm from 'os';
|
||||
import path from 'path';
|
||||
import each from 'jest-each';
|
||||
import * as main from '../src/main';
|
||||
|
@ -138,7 +138,8 @@ describe('setup-node', () => {
|
|||
});
|
||||
|
||||
it('can mock dist versions', async () => {
|
||||
let versions: im.INodeVersion[] = await im.getVersionsFromDist();
|
||||
const versionSpec = '1.2.3';
|
||||
let versions: im.INodeVersion[] = await im.getVersionsFromDist(versionSpec);
|
||||
expect(versions).toBeDefined();
|
||||
expect(versions?.length).toBe(23);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue