test(config): mock active console org
This commit is contained in:
parent
8675f51751
commit
f5b30cdf39
1 changed files with 16 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ import { Npm } from "../../src/npm"
|
||||||
|
|
||||||
const emptyAccount = Layer.mock(Account.Service)({
|
const emptyAccount = Layer.mock(Account.Service)({
|
||||||
active: () => Effect.succeed(Option.none()),
|
active: () => Effect.succeed(Option.none()),
|
||||||
|
activeOrg: () => Effect.succeed(Option.none()),
|
||||||
})
|
})
|
||||||
|
|
||||||
const emptyAuth = Layer.mock(Auth.Service)({
|
const emptyAuth = Layer.mock(Auth.Service)({
|
||||||
|
|
@ -282,6 +283,21 @@ test("resolves env templates in account config with account token", async () =>
|
||||||
active_org_id: OrgID.make("org-1"),
|
active_org_id: OrgID.make("org-1"),
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
activeOrg: () =>
|
||||||
|
Effect.succeed(
|
||||||
|
Option.some({
|
||||||
|
account: {
|
||||||
|
id: AccountID.make("account-1"),
|
||||||
|
email: "user@example.com",
|
||||||
|
url: "https://control.example.com",
|
||||||
|
active_org_id: OrgID.make("org-1"),
|
||||||
|
},
|
||||||
|
org: {
|
||||||
|
id: OrgID.make("org-1"),
|
||||||
|
name: "Example Org",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
),
|
||||||
config: () =>
|
config: () =>
|
||||||
Effect.succeed(
|
Effect.succeed(
|
||||||
Option.some({
|
Option.some({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue