Skip to content

Instantly share code, notes, and snippets.

@gpincheiraa
Created October 8, 2017 00:18
Show Gist options
  • Save gpincheiraa/4f9507e69c66678dc72cb9dc75fc3ee1 to your computer and use it in GitHub Desktop.
Save gpincheiraa/4f9507e69c66678dc72cb9dc75fc3ee1 to your computer and use it in GitHub Desktop.
todo.service.spec.js-2nd-article
import { TodoService } from "services/todo.service"
describe("TodoService", () => {
let TodoServiceInstance
beforeEach(() => {
const $http = {
get: jest.fn()
}
const BASE_URL = "http://localhost:5000/todos"
TodoServiceInstance = new TodoService($http, BASE_URL)
})
it("Should have defined", () => {
expect(TodoServiceInstance).toBeInstanceOf(TodoService)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment