Skip to content
Snippets Groups Projects

log error from spec require in test_bundle.js

Closed Luke "Jared" Bennett requested to merge log-caught-require-error-in-test_bundle into master
1 unresolved thread

What does this MR do?

log error from spec require in test_bundle.js

Today I ran into an issue where a require was failing, but I couldnt see why, this fixes that.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
21 21 testsContext(path);
22 22 } catch (err) {
23 23 console.error('[ERROR] Unable to load spec: ', path);
24 console.error(err);
24 25 describe('Test bundle', function () {
25 26 it(`includes '${path}'`, function () {
26 27 expect(err).toBeNull();
  • can you point to a build log where the error you were looking for didn't show up properly?

  • @mikegreiling It was local, I think I know how to repro it though, I was writing a test for a particularly poopy constructor.

  • If you could tell me how to reproduce it, I'd like to check it out. I'm all for this change, but I want to first know why the error reporting method we had in place already did not work.

  • @mikegreiling Sure :) I'll push a branch that repros it for you to see.

  • @mikegreiling I setup an example here: https://gitlab.com/gitlab-org/gitlab-ce/commits/testsContext-error-example-for-mike

    Turns out there is actually already a spec that isn't being required successfully (my balsamiq integration spec). So looks like this isn't failing correctly either. I think we just need to throw instead of having that describe+it block?

    Screen_Shot_2017-05-22_at_12.49.05

    Screen_Shot_2017-05-22_at_12.50.49

    Edited by Luke "Jared" Bennett
  • Scratch this. It is failing. I just never saw it. :face_palm:

  • Please register or sign in to reply
    Loading