Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
Add snippet for jasmine ng2 - element contains text
Browse files Browse the repository at this point in the history
  • Loading branch information
Hongwei Fang committed Dec 19, 2016
1 parent 500ab65 commit 98390de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions snippets/typescript-mode/jasmine-ng2-spec-element-text
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: jasmine-ng2-spec-element-text
# key: specel
# --
it('should display ${1:something}', () => {
let de: DebugElement = fixture.debugElement.query(By.css('${2:selector}'));
let el: HTMLElement = de.nativeElement;
expect(el.textContent).toContain('${3:expectToContain}');
});

0 comments on commit 98390de

Please sign in to comment.