Closed Bug 1101461 Opened 10 years ago Closed 9 years ago

Investigate the possibility to utilize new chai version for unit tests

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S3 (9jan)

People

(Reporter: mnjul, Assigned: mnjul)

Details

(Whiteboard: [p=1])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1070487 +++

As I said in bug 1070487 comment 4:

> In the past, we had deliberately ignored prototype-checking because doing
> that was particularly a hassle (since |assert.deepEqual| was not checking
> prototypes). Yet, for the sake of proper testing, we should've actually been
> checking prototypes for most of the cases.
> 
> I'd really like to see if the tests can be modified to formally account for
> checking prototypes, instead of hacking current logics to circumvent
> side-effects that've been brought by newer, prototype-checking
> |assert.deepEqual| (essentially, we would be double-hacking to realize
> something that should've been there in the first place, had we had
> prototype-checking |assert.deepEqual| back then).
> 
> With that said, to bring these formal test changes, we probably need
> somebody who's familiar with the keyboard testing logics and the inner
> rationals of those modules being tested; I do understand it can be
> unreasonable to require this patch (which, for the purpose of this bug, is
> just to bridge compatibility with newer chai.assert) to account for those
> formal changes.

Let's see how much work it's gonna be.
I'm looking into this right now.
Assignee: nobody → jlu
Status: NEW → ASSIGNED
Target Milestone: --- → 2.2 S3 (9jan)
Attached file Patch (PR @ GitHub)
Let's see if Gu is happy on this.
Comment on attachment 8539950 [details] [review]
Patch (PR @ GitHub)

Gu is good. Rudy, could you check this quick patch? Thanks!
Attachment #8539950 - Flags: review?(rlu)
Whiteboard: [p=1]
Comment on attachment 8539950 [details] [review]
Patch (PR @ GitHub)

Looks good to me. Thanks!
Attachment #8539950 - Flags: review?(rlu) → review+
Master: https://github.com/mozilla-b2g/gaia/commit/d5826b4a0015bdd047ac5d58830ab37822406701
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: