mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +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
1 changed files with 1 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue