Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting constants causes karma to crash and fail silently #2

Closed
ccampbell opened this issue Mar 11, 2016 · 2 comments
Closed

Exporting constants causes karma to crash and fail silently #2

ccampbell opened this issue Mar 11, 2016 · 2 comments

Comments

@ccampbell
Copy link

Im not sure this is specifically related to this plugin.

Karma config is similar to the one in your README.

To reproduce

  1. Create a test file test/something.js that looks like this:

    import { Something } from '../src/something';
    
    const expect = chai.expect;
    
    describe('Something', () => {
        it('Should exist', () => {
            expect(Something).to.exist;
        });
    });
  2. Create module src/something.js that looks like this:

    export function Something() {}
    export const SOME_CONST = 123;

Then run karma with PhantomJS, and you will notice that it fails silently. If you take out this plugin from your karma config, it will work correctly. It also works fine if you comment out this line:

// export const SOME_CONST = 123;

It took me a while to trace it down this far. Let me know if I can help further

@Victorystick
Copy link

@ccampbell See this PR gotwarlost/istanbul#507.

@artberri
Copy link
Owner

Thank you @Victorystick for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants