Skip to content
Prev Previous commit
Next Next commit
Fixes tests
  • Loading branch information
arcanis committed Aug 4, 2022
commit 443d09cd2417e21097a50cd77ace38f71a5d14fd
11 changes: 5 additions & 6 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/yarnpkg-pnp/sources/hook.js

Large diffs are not rendered by default.

23 changes: 6 additions & 17 deletions packages/yarnpkg-pnp/tests/pnpStandardRunner.test.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
import {FakeFS, Filename, npath, PortablePath, ppath, ZipFS} from '@yarnpkg/fslib';
import {getLibzipSync} from '@yarnpkg/libzip';
import {Filename, npath, PortablePath, ppath, ZipFS} from '@yarnpkg/fslib';
import {getLibzipSync} from '@yarnpkg/libzip';

import {hydratePnpFile} from '../sources';
import {hydratePnpFile} from '../sources';

import expectations from './testExpectations.json';

const withMemoryFs = async (cb: (fs: FakeFS<PortablePath>) => Promise<void>) => {
const fs = new ZipFS(null, {
libzip: getLibzipSync(),
});

try {
await cb(fs);
} catch (err) {
fs.discardAndClose();
throw err;
}
};
import expectations from './testExpectations.json';

const projectRoot = `/path/to/project` as PortablePath;

process.env.PNP_DEBUG_LEVEL = `0`;

for (const {manifest, tests} of expectations) {
const fakeFs = new ZipFS(null, {
libzip: getLibzipSync(),
Expand Down