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

ckapps / overckd / 13656842746

31 May 2023 01:52PM CUT 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/tag/create-tag.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 { TagRepositoryToken } from '../../tokens';
×
7
import { CreateTagCommand } from './tag.command';
×
8
import { TagCreatedEvent } from './tag.event';
×
NEW
9
import { createTag } from './tag.model';
×
10

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

20
  return event$.pipe(
×
21
    matchEvent(CreateTagCommand),
22
    act(eventValidator$(CreateTagCommand)),
23
    act(event =>
24
      pipe(
×
25
        event.payload,
26
        createTag,
27
        repo.add,
28
        mergeMap(tag => [
×
29
          TagCreatedEvent.create(tag),
30
          reply(event)(TagCreatedEvent.create(tag)),
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