mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Improve a test
This commit is contained in:
@@ -90,6 +90,7 @@ test("getChangedPackages works", async () => {
|
||||
name: "some-package",
|
||||
version: "1.0.0"
|
||||
});
|
||||
await fs.writeFile(path.join(dir, "CHANGELOG.md"), "some content");
|
||||
await exec("git", ["add", "."], { cwd: dir });
|
||||
await exec("git", ["commit", "-m", "initial commit"], { cwd: dir });
|
||||
let emptyWorkspaces = await getChangedPackages(dir);
|
||||
@@ -98,6 +99,7 @@ test("getChangedPackages works", async () => {
|
||||
name: "some-package",
|
||||
version: "2.0.0"
|
||||
};
|
||||
await fs.writeFile(path.join(dir, "CHANGELOG.md"), "other content");
|
||||
await fs.writeJson(path.join(dir, "package.json"), workspace);
|
||||
let workspaces = await getChangedPackages(dir);
|
||||
expect(workspaces).toEqual([
|
||||
|
||||
Reference in New Issue
Block a user