# Code coverage report for src/lib/services/storage/storage.service.mock.ts

# All files / src/lib/services/storage storage.service.mock.ts

88.88% Statements 16/18
50% Branches 12/24
83.33% Functions 5/6
91.66% Lines 11/12

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
    191x
    1x
    1x
    1x
    1x

    1x

    33x

    6x

    21x

     import { Injectable } from '@angular/core';

    @InjIectable()
    export class StorageServiceMock {
    	store = {};

    	constructor() {}

    	public set(key: string, item: any) {
    		this.store[key] = item;
    	}
    	public get(key: string): any {
    		return this.store[key] || '{}';
    	}
    	public clear() {
    		this.store = {};
    	}
    }