feat(lanes): add MIGRATIONS_DIR + GENERATED_MERGE_PATHS profile declarations (E2)
This commit is contained in:
@@ -90,3 +90,24 @@ describe("hookEnv extraEnv", () => {
|
||||
slots.releaseSlot(lane.id);
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveProfile — E2 declarations", () => {
|
||||
it("defaults MIGRATIONS_DIR to empty and GENERATED_MERGE_PATHS to an empty array", () => {
|
||||
const lane = makeLane();
|
||||
writeProfile(lane.cwd, "PORTS=api\n");
|
||||
const profile = profileLib.resolveProfile(lanesLib.getLane(lane.id));
|
||||
assert.equal(profile.env.MIGRATIONS_DIR, "");
|
||||
assert.deepEqual(profile.generatedMergePaths, []);
|
||||
});
|
||||
|
||||
it("parses declared MIGRATIONS_DIR and GENERATED_MERGE_PATHS", () => {
|
||||
const lane = makeLane();
|
||||
writeProfile(
|
||||
lane.cwd,
|
||||
'PORTS=api\nMIGRATIONS_DIR="db/migrations"\nGENERATED_MERGE_PATHS="api/openapi.json api/client.ts"\n'
|
||||
);
|
||||
const profile = profileLib.resolveProfile(lanesLib.getLane(lane.id));
|
||||
assert.equal(profile.env.MIGRATIONS_DIR, "db/migrations");
|
||||
assert.deepEqual(profile.generatedMergePaths, ["api/openapi.json", "api/client.ts"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user