[Fixed] Jest, TypeScript: Missing semi colon error


I am writing basic test using Jest for my angular project. However, I get a weird missing semi-colon error that I cannot understand how to fix.

import { RegistrationService } from "../registration/services/registration.service";
describe("Email Validator function", () => {
let registrationService: RegistrationService;

test("Check Email Exists", () => {
    const input = '[email protected]';



SyntaxError: src\app\__tests__\email-validator.spec.ts: Missing semicolon (4:25)

  2 |
  3 | describe("Email Validator function", () => {
> 4 |   let registrationService: RegistrationService;


I followed instructions here: https://basarat.gitbook.io/typescript/intro-1/jest

Basically I was missing ts-jest and the jest.config.js as mentioned in that article.

Leave a Reply

(*) Required, Your email will not be published