Last modified: 2012-04-16 14:18:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37769, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35769 - Convert jasmin test for mediawiki.Uri module to qunit
Convert jasmin test for mediawiki.Uri module to qunit
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-06 21:49 UTC by Brion Vibber
Modified: 2012-04-16 14:18 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2012-04-06 21:49:12 UTC
keep em consistent :)
Comment 1 Antoine "hashar" Musso (WMF) 2012-04-08 19:29:28 UTC
Then add a layer of BDD on top of QUnit ? =)
Comment 2 Lupo 2012-04-09 21:41:06 UTC
Pavlov? https://github.com/mmonteleone/pavlov 

No idea how stable that is.
Comment 3 Krinkle 2012-04-14 05:01:07 UTC
(In reply to comment #1)
> Then add a layer of BDD on top of QUnit ? =)

Not sure how serious I should take the wink, but I'll ask.. Why would we want to maintain two separate unit test frameworks for MediaWiki JavaScript?

Would you welcome someone adding the PHP SimpleTest framework to MediaWiki and start writing unit tests in it and then having to bridge that to PHPUnit for continuous integration?

Assuming no, lets just stick to converting it to QUnit.
Comment 4 Krinkle 2012-04-14 05:09:41 UTC
btw, although QUnit may not be marked as BDD officially, its practically the same

- QUnit:

module( '..', {
 setup: fn(),
 tearDown: fn (),
} );

test( '..', function () {
  /* assertions: equal(), deepEqual, strictEqual, QUnit.ltOrEq, .. */
});

test( '..', function () {
  /* assertions: .. */
});

- Jasmine:

describe( '..', function () {

  beforeEach( fn () );

  it( '..', function () {
     /* assertions: expect.toEqual(), .. /
  });
});
Comment 7 Antoine "hashar" Musso (WMF) 2012-04-16 14:18:37 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Then add a layer of BDD on top of QUnit ? =)
> 
> Not sure how serious I should take the wink, but I'll ask.. Why would we want
> to maintain two separate unit test frameworks for MediaWiki JavaScript?

It is not a separated framework. Pavlov is build on top of QUnit, it is merely extending it just like  PHPUnit_Extensions_Story_TestCase extends PHPUnit :-]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links