All files / src/lib/core action-registry.service.ts

80% Statements 4/5
100% Branches 0/0
66.67% Functions 2/3
75% Lines 3/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27                  1x         39x       9x                
import { Injectable } from '@angular/core';
import { actions } from './actions';
 
/**
 * A registry for actions that can be dispatched.
 */
@Injectable({
  providedIn: 'root'
})
export class ActionRegistryService {
 
  private readonly actions: any;
 
  constructor() {
    this.actions = { ...actions };
  }
 
  getActions(key: string): any {
    return this.actions[key];
  }
 
  putActions(key: string, action: any): any {
    this.actions[key] = action ;
  }
 
}