Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Show the point of failure if assertion fails #256

Open
pranavparikh opened this issue Jun 6, 2014 · 0 comments
Open

Show the point of failure if assertion fails #256

pranavparikh opened this issue Jun 6, 2014 · 0 comments

Comments

@pranavparikh
Copy link

If some assertion fails , Arrow should output the actual assertion which
failed.

For e.g, in the test below,

var module = Y.one('#mediasportsathletefilter'),
suite = new Y.Test.Suite("MediaSportsAthleteFilter Test Suite");

suite.add(new Y.Test.Case({
  "#1 - test Module Presence": function() {
    Y.Assert.isNotNull(module);
    Y.Assert.isTrue(module.one('.hd h3').get('text') !== '');
    Y.Assert.areEqual(module.all('.bd select').size(), 2);
    Y.Assert.areEqual(module.all('.bd input').size(), 4);
  }
}));

If Y.Assert.isTrue(module.one('.hd h3').get('text') !== ''); failed, output the
line

Y.Assert.isTrue(module.one('.hd h3').get('text') !== ''); alongwith the failed
assertion in the error message.

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

No branches or pull requests

1 participant