jest: fix temp dir

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-07-31 11:01:57 +02:00
parent a8cf50098a
commit aa8033de8f
14 changed files with 59 additions and 73 deletions

View File

@@ -14,15 +14,15 @@
* limitations under the License.
*/
import path from 'path';
import {describe, expect, it} from '@jest/globals';
import fs from 'fs';
import os from 'os';
import path from 'path';
import {Cache} from '../src/cache';
// prettier-ignore
const tmpDir = path.join(process.env.TEMP || '/tmp', 'cache-jest');
const fixturesDir = path.join(__dirname, 'fixtures');
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'cache-itg-'));
describe('cache', () => {
it('github-repo', async () => {