mirror of
https://github.com/actions/setup-node.git
synced 2025-09-11 11:16:17 +00:00
update the field
This commit is contained in:
parent
85d6eeb440
commit
72899a8e31
4 changed files with 20 additions and 51 deletions
|
@ -285,28 +285,6 @@ describe('main tests', () => {
|
|||
});
|
||||
|
||||
describe('cache feature tests', () => {
|
||||
it('Should enable caching with the resolved package manager from devEngines.packageManager in package.json when the cache input is not provided', async () => {
|
||||
inputs['package-manager-cache'] = 'true';
|
||||
inputs['cache'] = ''; // No cache input is provided
|
||||
|
||||
inSpy.mockImplementation(name => inputs[name]);
|
||||
|
||||
const readFileSpy = jest.spyOn(fs, 'readFileSync');
|
||||
readFileSpy.mockImplementation(() =>
|
||||
JSON.stringify({
|
||||
devEngines: {
|
||||
packageManager: {
|
||||
name: 'pnpm'
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
await main.run();
|
||||
|
||||
expect(saveStateSpy).toHaveBeenCalledWith(expect.anything(), 'pnpm');
|
||||
});
|
||||
|
||||
it('Should enable caching with the resolved package manager from packageManager field in package.json when the cache input is not provided', async () => {
|
||||
inputs['package-manager-cache'] = 'true';
|
||||
inputs['cache'] = ''; // No cache input is provided
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue