Skip to content

Instantly share code, notes, and snippets.

@leopic
Created July 19, 2017 16:52
Show Gist options
  • Save leopic/a694a17d2fbc9d7a133c7d90d5df643f to your computer and use it in GitHub Desktop.
Save leopic/a694a17d2fbc9d7a133c7d90d5df643f to your computer and use it in GitHub Desktop.
src/sample.spec.ts
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
--- a/src/sample.spec.ts
+++ b/src/sample.spec.ts
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -1,5 +1,6 @@
import { TestBed, inject, async } from '@angular/core/testing';
import { TestBed, inject, async, fakeAsync, tick } from '@angular/core/testing';
import { SampleModule, SampleService } from "./";
describe('SampleTest', () => {
beforeEach(() => {
TestBed.configureTestingModule({
@@ -28,6 +29,11 @@ describe('SampleTest', () => {
}, 500)
}))
it('should expect fakeAsync', fakeAsync(() => {
tick()
expect(true).toBeTruthy()
}))
it('should inject', inject([SampleService], (service: SampleService) => {
expect(service).toBeTruthy()
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment