title: Why do I get a "error TS1005: ';' expected." error when running a simple Jasmine test?
body: <p>I'm using Angular 7.  I wrote a real simple test class, src/app/pastebin.ts,</p>
  
  <pre><code>export class Pastebin {
      id: number;
      title: string;
      language: string;
      paste: string;
  
      constructor(values: Object = {}) {
          Object.assign(this, values);
    }
  }
  
  export const Languages = ["Ruby","Java", "JavaScript", "C", "Cpp"];
  </code></pre>
  
  <p>and then a real simple Jasmine spec, src/app/pastebin.spec.ts, to test it, </p>
  
  <pre><code>/* pastebin.spec.ts */
  
  //import the Pastebin class
  import { Pastebin } from './pastebin';
  
  describe('Pastebin', () =&gt; {
      it('should create an instance of Pastebin',() =&gt; {
          expect(new Pastebin()).toBeTruthy();
      });
  
  })
  </code></pre>
  
  <p>but when I go to run my tests, I get some errors that look like anything related to what I've done ...</p>
  
  <pre><code>localhost:Pastebin davea$ ng test
   10% building modules 1/1 modules 0 active30 08 2019 15:53:13.954:WARN [karma]: No captured browser, open http://localhost:9876/
  30 08 2019 15:53:13.960:INFO [karma]: Karma v2.0.5 server started at http://0.0.0.0:9876/
  30 08 2019 15:53:13.960:INFO [launcher]: Launching browsers Chrome, ChromeNoSandboxHeadless with unlimited concurrency
  30 08 2019 15:53:13.964:INFO [launcher]: Starting browser Chrome
  30 08 2019 15:53:13.974:INFO [launcher]: Starting browser Chrome
  [./src/test.ts] ./src/test.ts 0 bytes {main} [built]                               
     [0] multi ./src/polyfills.ts 28 bytes {polyfills} [built]
  [./src/polyfills.ts] ./src/polyfills.ts 0 bytes {polyfills} [built]
  
  ERROR in node_modules/@types/jasmine/index.d.ts(142,47): error TS1005: ';' expected.
  node_modules/@types/jasmine/index.d.ts(142,90): error TS1005: '(' expected.
  node_modules/@types/jasmine/index.d.ts(142,104): error TS1005: ']' expected.
  node_modules/@types/jasmine/index.d.ts(142,112): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(142,113): error TS1136: Property assignment expected.
  node_modules/@types/jasmine/index.d.ts(142,121): error TS1005: ')' expected.
  node_modules/@types/jasmine/index.d.ts(142,147): error TS1005: '(' expected.
  node_modules/@types/jasmine/index.d.ts(142,162): error TS1005: ']' expected.
  node_modules/@types/jasmine/index.d.ts(142,163): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(142,164): error TS1136: Property assignment expected.
  node_modules/@types/jasmine/index.d.ts(142,165): error TS1136: Property assignment expected.
  node_modules/@types/jasmine/index.d.ts(142,179): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(142,183): error TS1005: ':' expected.
  node_modules/@types/jasmine/index.d.ts(142,208): error TS1005: '{' expected.
  node_modules/@types/jasmine/index.d.ts(142,217): error TS1005: ':' expected.
  node_modules/@types/jasmine/index.d.ts(142,222): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(142,227): error TS1005: ':' expected.
  node_modules/@types/jasmine/index.d.ts(142,228): error TS1109: Expression expected.
  node_modules/@types/jasmine/index.d.ts(142,230): error TS1005: ')' expected.
  node_modules/@types/jasmine/index.d.ts(635,30): error TS1005: ';' expected.
  node_modules/@types/jasmine/index.d.ts(720,1): error TS1128: Declaration or statement expected.
  </code></pre>
  
  <p>Anyone know how I can approach this problem?</p>
  
  <p><b>Edit:</b> In response to the answer given, this is the new output ...</p>
  
  <pre><code>localhost:Pastebin davea$ ng test
   10% building modules 1/1 modules 0 active01 09 2019 11:34:18.591:WARN [karma]: No captured browser, open http://localhost:9876/
  01 09 2019 11:34:18.616:INFO [karma-server]: Karma v4.3.0 server started at http://0.0.0.0:9876/
  01 09 2019 11:34:18.617:INFO [launcher]: Launching browsers Chrome, ChromeNoSandboxHeadless with concurrency unlimited
  01 09 2019 11:34:18.622:INFO [launcher]: Starting browser Chrome
  01 09 2019 11:34:18.797:INFO [launcher]: Starting browser Chrome
  [./src/test.ts] ./src/test.ts 0 bytes {main} [built]                               
     [0] multi ./src/polyfills.ts 28 bytes {polyfills} [built]
  [./src/polyfills.ts] ./src/polyfills.ts 0 bytes {polyfills} [built]
  
  ERROR in node_modules/@types/jasmine/index.d.ts(191,11): error TS1005: ';' expected.
  node_modules/@types/jasmine/index.d.ts(192,36): error TS1005: '(' expected.
  node_modules/@types/jasmine/index.d.ts(192,50): error TS1005: ']' expected.
  node_modules/@types/jasmine/index.d.ts(192,58): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(192,59): error TS1136: Property assignment expected.
  node_modules/@types/jasmine/index.d.ts(192,67): error TS1005: ')' expected.
  node_modules/@types/jasmine/index.d.ts(193,37): error TS1005: '(' expected.
  node_modules/@types/jasmine/index.d.ts(193,52): error TS1005: ']' expected.
  node_modules/@types/jasmine/index.d.ts(193,53): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(193,54): error TS1136: Property assignment expected.
  node_modules/@types/jasmine/index.d.ts(193,55): error TS1136: Property assignment expected.
  node_modules/@types/jasmine/index.d.ts(193,69): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(193,73): error TS1005: ':' expected.
  node_modules/@types/jasmine/index.d.ts(193,98): error TS1005: '{' expected.
  node_modules/@types/jasmine/index.d.ts(193,107): error TS1005: ':' expected.
  node_modules/@types/jasmine/index.d.ts(193,112): error TS1005: ',' expected.
  node_modules/@types/jasmine/index.d.ts(193,117): error TS1005: ':' expected.
  node_modules/@types/jasmine/index.d.ts(193,118): error TS1109: Expression expected.
  node_modules/@types/jasmine/index.d.ts(193,120): error TS1005: ')' expected.
  node_modules/@types/jasmine/index.d.ts(748,30): error TS1005: ';' expected.
  node_modules/@types/jasmine/index.d.ts(854,1): error TS1128: Declaration or statement expected.
  </code></pre>
  
  <p><b>Edit 2:</b>After applying the suggestion from the answer I got the new error</p>
  
  <pre><code>davea$ ng test
   10% building modules 1/1 modules 0 active02 09 2019 10:20:52.750:WARN [karma]: No captured browser, open http://localhost:9876/
  02 09 2019 10:20:52.776:INFO [karma-server]: Karma v4.3.0 server started at http://0.0.0.0:9876/
  02 09 2019 10:20:52.776:INFO [launcher]: Launching browsers Chrome, ChromeNoSandboxHeadless with concurrency unlimited
  02 09 2019 10:20:52.780:INFO [launcher]: Starting browser Chrome
  02 09 2019 10:20:52.787:INFO [launcher]: Starting browser Chrome
  02 09 2019 10:20:56.030:WARN [karma]: No captured browser, open http://localhost:9876/  
  02 09 2019 10:20:56.216:INFO [HeadlessChrome 76.0.3809 (Mac OS X 10.13.6)]: Connected on socket lcRdfhRmFhHi04mTAAAA with id 64655559
  02 09 2019 10:20:56.232:INFO [Chrome 76.0.3809 (Mac OS X 10.13.6)]: Connected on socket IL97l6a-00J6s9H9AAAB with id 6205557
  Browser {
    id: '6205557',
    fullName: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) ' +
      'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 ' +
      'Safari/537.36',
    name: 'Chrome 76.0.3809 (Mac OS X 10.13.6)',
    lastResult: [BrowserResult],
    disconnectsCount: 0,
    activeSockets: [Array],
    noActivityTimeout: 30000,
    collection: [BrowserCollection],
    emitter: [Server],
    socket: [Socket],
    timer: [Object],
    disconnectDelay: 2000,
    log: [Logger],
    noActivityTimeoutId: Timeout {
      _idleTimeout: 30000,
      _idlePrev: [Timeout],
      _idleNext: [Timeout],
      _idleStart: 10322,
      _onTimeout: [Function],
      _timerArgs: undefined,
      _repeat: null,
      _destroyed: false,
      [Symbol(refed)]: true,
      [Symbol(asyncId)]: 19087,
      [Symbol(triggerId)]: 19085
    },
    pendingDisconnect: null,
    state: 'EXECUTING'
  } ERROR
    An error was thrown in afterAll
    TypeError: env.catchExceptions is not a function
        at node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:24:9
        at node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:58:3
  Chrome 76.0.3809 (Mac OS X 10.13.6): Executed 4 of 4 ERROR (0 secs / 0.154 secs)
  HeadlessChrome 76.0.3809 (Mac OS X 10.13.6): Executed 3 of 4 SUCCESS (0 secs / 0.132 secs)
  Browser {
    id: '6205557',
    fullName: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) ' +
      'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 ' +
      'Safari/537.36',
    name: 'Chrome 76.0.3809 (Mac OS X 10.13.6)',
    lastResult: [BrowserResult],
    disconnectsCount: 0,
    activeSockets: [Array],
    noActivityTimeout: 30000,
    collection: [BrowserCollection],
    emitter: [Server],
    socket: [Socket],
    timer: [Object],
    disconnectDelay: 2000,
    log: [Logger],
    noActivityTimeoutId: Timeout {
      _idleTimeout: 30000,
      _idlePrev: [Timeout],
      _idleNext: [Timeout],
      _idleStart: 10322,
      _onTimeout: [Function],
      _timerArgs: undefined,
      _repeat: null,
      _destroyed: false,
      [Symbol(refed)]: true,
      [Symbol(asyncId)]: 19087,
      [Symbol(triggerId)]: 19085
    },
    pendingDisconnect: null,
    state: 'EXECUTING'
  } ERROR
    An error was thrown in afterAll
    TypeError: env.catchExceptions is not a function
  </code></pre>
  
  <p><b>Edit 3</b> Here's the package.json ...</p>
  
  <pre><code>localhost:Pastebin davea$ cat package.json 
  {
    "name": "pastebin",
    "version": "0.0.0",
    "license": "MIT",
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build --prod",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "^5.2.0",
      "@angular/common": "^5.2.0",
      "@angular/compiler": "^5.2.0",
      "@angular/core": "^5.2.0",
      "@angular/forms": "^5.2.0",
      "@angular/http": "^5.2.0",
      "@angular/platform-browser": "^5.2.0",
      "@angular/platform-browser-dynamic": "^5.2.0",
      "@angular/router": "^5.2.0",
      "core-js": "^2.4.1",
      "rxjs": "^5.5.6",
      "zone.js": "^0.8.19"
    },
    "devDependencies": {
      "@angular/cli": "~1.7.4",
      "@angular/compiler-cli": "^5.2.0",
      "@angular/language-service": "^5.2.0",
      "@types/jasmine": "^2.8.8",
      "@types/jasminewd2": "~2.0.2",
      "@types/node": "~6.0.60",
      "codelyzer": "^4.0.1",
      "jasmine-core": "^2.99.1",
      "jasmine-spec-reporter": "^3.2.0",
      "karma": "^4.3.0",
      "karma-chrome-launcher": "^3.1.0",
      "karma-coverage-istanbul-reporter": "^1.2.1",
      "karma-jasmine": "^2.0.1",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.1.2",
      "ts-node": "~4.1.0",
      "tslint": "~5.9.1",
      "typescript": "^2.7.2"
    }
  }
  </code></pre>
  
  <p>and here's the error I get upon running the tests ...</p>
  
  <pre><code>localhost:Pastebin davea$ ng test
   10% building modules 1/1 modules 0 active07 09 2019 12:27:20.412:WARN [karma]: No captured browser, open http://localhost:9876/
  07 09 2019 12:27:20.429:INFO [karma-server]: Karma v4.3.0 server started at http://0.0.0.0:9876/
  07 09 2019 12:27:20.429:INFO [launcher]: Launching browsers Chrome, ChromeNoSandboxHeadless with concurrency unlimited
  07 09 2019 12:27:20.433:INFO [launcher]: Starting browser Chrome
  07 09 2019 12:27:20.441:INFO [launcher]: Starting browser Chrome
  07 09 2019 12:27:23.398:WARN [karma]: No captured browser, open http://localhost:9876/  
  07 09 2019 12:27:23.600:INFO [HeadlessChrome 76.0.3809 (Mac OS X 10.13.6)]: Connected on socket BQzsVF64PPIY9jUsAAAA with id 32854347
  07 09 2019 12:27:23.624:INFO [Chrome 76.0.3809 (Mac OS X 10.13.6)]: Connected on socket edznAyypyhtvngwrAAAB with id 87775700
  HeadlessChrome 76.0.3809 (Mac OS X 10.13.6) ERROR
    An error was thrown in afterAll
    TypeError: env.catchExceptions is not a function
        at node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:24:9
        at node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:58:3
  HeadlessChrome 76.0.3809 (Mac OS X 10.13.6): Executed 4 of 4 ERROR (0 secs / 0.144 secs)
  Chrome 76.0.3809 (Mac OS X 10.13.6): Executed 2 of 4 SUCCESS (0 secs / 0.117 secs)
  HeadlessChrome 76.0.3809 (Mac OS X 10.13.6) ERROR
    An error was thrown in afterAll
    TypeError: env.catchExceptions is not a function
  Chrome 76.0.3809 (Mac OS X 10.13.6) ERROR
    An error was thrown in afterAll
    TypeError: env.catchExceptions is not a function
        at node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:24:9
        at node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:58:3
  HeadlessChrome 76.0.3809 (Mac OS X 10.13.6): Executed 4 of 4 ERROR (0.146 secs / 0.144 secs)
  Chrome 76.0.3809 (Mac OS X 10.13.6): Executed 4 of 4 ERROR (0 secs / 0.142 secs)
  Chrome 76.0.3809 (Mac OS X 10.13.6) ERROR
    An error was thrown in afterAll
    TypeError: env.catchExceptions is not a function
  HeadlessChrome 76.0.3809 (Mac OS X 10.13.6): Executed 4 of 4 ERROR (0.146 secs / 0.144 secs)
  Chrome 76.0.3809 (Mac OS X 10.13.6): Executed 4 of 4 ERROR (0.157 secs / 0.142 secs)
  </code></pre>