mirror of
https://github.com/actions/setup-node
synced 2025-04-19 14:43:12 +00:00
Read package.json contents directly during tests
- this eliminates OS-specific line-ending issues
This commit is contained in:
parent
57edf6c8ba
commit
f8cdefe984
@ -593,12 +593,7 @@ describe('setup-node', () => {
|
||||
|
||||
it('reads package.json as node-version-file if provided', async () => {
|
||||
// Arrange
|
||||
const versionSpec = `{
|
||||
\"engines\": {
|
||||
\"node\": \">=14.0.0\"
|
||||
}
|
||||
}
|
||||
`;
|
||||
const versionSpec = fs.readFileSync(path.join(__dirname, 'data/package.json'), 'utf-8');
|
||||
const versionFile = 'package.json';
|
||||
const expectedVersionSpec = '14';
|
||||
process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data');
|
||||
|
Loading…
Reference in New Issue
Block a user