Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Create a directive mock #8

Open
dianjuar opened this issue Apr 3, 2019 · 0 comments
Open

Create a directive mock #8

dianjuar opened this issue Apr 3, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@dianjuar
Copy link
Member

dianjuar commented Apr 3, 2019

Useful to implement in test and inject the mock instead of the real one. Could be something like

import { Directive, Input } from '@angular/core';

@Directive({
    selector: '[appSticky]'
})
export class StickyMockDirective {
    @Input() sentinelOn: HTMLElement;
    @Input() classWhenSticky: string;
    @Input() debugMode: boolean;
}
@dianjuar dianjuar added the enhancement New feature or request label Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant