Created
October 8, 2017 00:18
-
-
Save gpincheiraa/4f9507e69c66678dc72cb9dc75fc3ee1 to your computer and use it in GitHub Desktop.
todo.service.spec.js-2nd-article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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