From d86a20eb78d29d751b5f8366dbabb9b0adcda390 Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Thu, 30 Jun 2022 09:17:18 -0700 Subject: [PATCH] test: fix versionSpec --- __tests__/installer.test.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 42c6760..7166eb7 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -587,19 +587,8 @@ describe('setup-node', () => { it('reads node-version-file if provided (package.json, volta)', async () => { // Arrange - const versionSpec = `{ - "name": "test", - "version": "1.0.0", - "private": true, - "scripts": { - "test": "echo test" - }, - "volta": { - "node": "16.15.1" - } -} -`; const versionFile = 'package.json'; + const versionSpec = fs.readFileSync(path.join(__dirname, 'data', versionFile), 'utf8'); const expectedVersionSpec = '16.15.1'; process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data'); inputs['node-version-file'] = versionFile;