Skip to content

Commit 62bd11a

Browse files
committed
Read package.json contents directly during tests
- this eliminates OS-specific line-ending issues
1 parent 0aecd56 commit 62bd11a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

__tests__/installer.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,7 @@ describe('setup-node', () => {
608608

609609
it('reads package.json as node-version-file if provided', async () => {
610610
// Arrange
611-
const versionSpec = `{
612-
\"engines\": {
613-
\"node\": \">=14.0.0\"
614-
}
615-
}
616-
`;
611+
const versionSpec = fs.readFileSync(path.join(__dirname, 'data/package.json'), 'utf-8');
617612
const versionFile = 'package.json';
618613
const expectedVersionSpec = '14';
619614
process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy