• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ckapps / overckd / 13656842746

31 May 2023 01:52PM UTC coverage: 20.328%. First build
13656842746

push

github

web-flow
Merge pull request #17 from ckapps/chore/update-deps

Chore/update deps

32 of 288 branches covered (11.11%)

Branch coverage included in aggregate %.

32 of 270 new or added lines in 73 files covered. (11.85%)

464 of 2152 relevant lines covered (21.56%)

0.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/domain-rx/src/models/recipe-collection/create-collection.effect.ts
NEW
1
import { act, matchEvent, useContext } from '@marblejs/core';
×
NEW
2
import { MsgEffect, reply } from '@marblejs/messaging';
×
3
import { eventValidator$ } from '@marblejs/middleware-io';
×
NEW
4
import { pipe } from 'fp-ts/function';
×
NEW
5
import { mergeMap } from 'rxjs/operators';
×
NEW
6
import { RecipeCollectionRepositoryToken } from '../../tokens';
×
7
import { CreateRecipeCollectionCommand } from './recipe-collection.command';
×
8
import { RecipeCollectionCreatedEvent } from './recipe-collection.event';
×
NEW
9
import { createRecipeCollection } from './recipe-collection.model';
×
10

11
/**
12
 * Event effect for creating recipe collection.
13
 *
14
 * @param event$ Event observable
15
 * @param ctx Event Context
16
 */
17
export const createCollection: MsgEffect = (event$, ctx) => {
×
18
  const repo = useContext(RecipeCollectionRepositoryToken)(ctx.ask);
×
19

20
  return event$.pipe(
×
21
    matchEvent(CreateRecipeCollectionCommand),
22
    act(eventValidator$(CreateRecipeCollectionCommand)),
23
    act(event =>
24
      pipe(
×
25
        event.payload,
26
        createRecipeCollection,
27
        repo.add,
28
        mergeMap(collection => [
×
29
          RecipeCollectionCreatedEvent.create(collection),
30
          reply(event)(RecipeCollectionCreatedEvent.create(collection)),
31
        ]),
32
      ),
33
    ),
34
  );
35
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc