describe("ContentDeliveryService (Integration)", () => {
it.effect("should successfully be able to retrieve de-de news by ID", () =>
Effect.gen(function* () {
const svc = yield* ContentDeliveryService
const id = NewsId.make("bltab9ed59fd4d998eb")
const locale = Locale.make("de-de")
const response = yield* svc.getNewsById(id, locale)
expect(response.entry.uid).toBe(id)
expect(response.entry.locale).toBe(locale)
}).pipe(
Effect.provide(ContentDeliveryService.Default),
// how do I dedupe these two lines perhaps in a beforeAll call:
Effect.provide(PlatformConfigProvider.layerDotEnv(".env")),
Effect.provide(NodeFileSystem.layer)
)
)
// similar it.effect test cases here...
})
describe("ContentDeliveryService (Integration)", () => {
it.effect("should successfully be able to retrieve de-de news by ID", () =>
Effect.gen(function* () {
const svc = yield* ContentDeliveryService
const id = NewsId.make("bltab9ed59fd4d998eb")
const locale = Locale.make("de-de")
const response = yield* svc.getNewsById(id, locale)
expect(response.entry.uid).toBe(id)
expect(response.entry.locale).toBe(locale)
}).pipe(
Effect.provide(ContentDeliveryService.Default),
// how do I dedupe these two lines perhaps in a beforeAll call:
Effect.provide(PlatformConfigProvider.layerDotEnv(".env")),
Effect.provide(NodeFileSystem.layer)
)
)
// similar it.effect test cases here...
})