Skip to content

unit test with jest broke after upgrading from 1.14 to 2.0.0 #524

@yuchuan1

Description

@yuchuan1

src

export class WebsocketService {
...
constructor(
    private store: Store,
    private translateService: TranslateService,
    public socket: RxStompService
  ) {
    this.socket = new RxStompService();

    this.socket.connectionState$
      .pipe(untilDestroyed(this))
      .subscribe((d: RxStompState) => {
        this.store.dispatch(wsUpdateState({ state: RxStompState[d] }));
      });


Error Message

Details:

    /Users/eddie/iabg/holmes/node_modules/@stomp/rx-stomp/esm6/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export * from './rx-stomp-config.js';
                                                                                      ^^^^^^

    SyntaxError: Unexpected token 'export'

      3 | import { Store } from '@ngrx/store';
      4 | import { TranslateService } from '@ngx-translate/core';
    > 5 | import { RxStompState } from '@stomp/rx-stomp';
        | ^
      6 | import { Subscription } from 'rxjs';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions