Skip to content

Still getting transpiled output with simple test #2

@buddyp450

Description

@buddyp450
describe('example', () => {
  before(() => {
    return require('system-node-sourcemap')().then(() => {
      return System.import('test/test-error.js');
    }).catch(error => { console.error(error); });
  });
  it('reaches the test', () => {
    expect(true).to.equal(true); // passes
  });
});

test/test-error.js

const myFn = () => {
  throw Error('hello');
};

export default myFn();

output:

(SystemJS) hello
        Error: hello
            at Error (native)
            at myFn (C:/Users/cpatton/Documents/periscopereact/client/test/test-error.js!transpiled:9:15)
            at execute (C:/Users/cpatton/Documents/periscopereact/client/test/test-error.js!transpiled:12:26)
        Error loading C:/Users/cpatton/Documents/periscopereact/client/test/test-error.js
    √ is able to reach the test

I expected this to output the error at test-error.js line 2 (or even 5?) - not 9, could you please highlight what I'm doing wrong here?

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