添加 docker runsh 命令
This commit is contained in:
@@ -11,6 +11,32 @@ async function createRemote() {
|
||||
return remote
|
||||
}
|
||||
|
||||
function writeFixtureProject(tempDir, version, content) {
|
||||
const projectDir = path.resolve(tempDir, `fixture-${version}`);
|
||||
fs.mkdirSync(projectDir, { recursive: true });
|
||||
|
||||
const filePath = path.resolve(projectDir, "myapp.txt");
|
||||
fs.writeFileSync(filePath, content, "utf-8");
|
||||
|
||||
fs.writeFileSync(path.resolve(projectDir, "meta.json"), JSON.stringify({
|
||||
id: "myapp",
|
||||
version,
|
||||
desc: "test app",
|
||||
official_url: "https://example.test/myapp",
|
||||
dist: [
|
||||
{
|
||||
path: filePath,
|
||||
os: "any",
|
||||
platform: "any",
|
||||
filename: "myapp.txt",
|
||||
type: "data"
|
||||
}
|
||||
]
|
||||
}, null, 4), "utf-8");
|
||||
|
||||
return projectDir;
|
||||
}
|
||||
|
||||
let tempDir;
|
||||
let localStore;
|
||||
|
||||
@@ -98,3 +124,4 @@ describe("remote module public API", () => {
|
||||
expect(fs.existsSync(path.resolve(localStore, "modules", "myapp", "versions", "1.0.0"))).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user