Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
683 Bytes
import * as path from 'path';
import * as shell from 'shelljs';
export const rootDir = process.cwd();
shell.config.silent = true;
export function setupStageWithFixture(
testDir: string,
stageName: string,
fixtureName: string
): void {
const stagePath = path.join(rootDir, stageName);
shell.mkdir(stagePath);
shell.exec(
`cp -a ${rootDir}/test/${testDir}/fixtures/${fixtureName}/. ${stagePath}/`
);
shell.ln(
'-s',
path.join(rootDir, 'node_modules'),
path.join(stagePath, 'node_modules')
);
shell.cd(stagePath);
}
export function teardownStage(stageName: string): void {
shell.cd(rootDir);
shell.rm('-rf', path.join(rootDir, stageName));
}