francejs / effroi

Codename : effroi
MIT License
27 stars 6 forks source link

On unifying device APIs #7

Open nfroidure opened 10 years ago

nfroidure commented 10 years ago

Usually, when you test an application, you need to test its usability with every possible devices.

That's why i think we should set generic methods to allow doing mocha tests like this:

describe('Activing a menu link should work with ', function() {
    effroi.devices.forEach(function(device) {
        it(device.NAME + ' device', function() {
            device.cmd(button); // clic / touch / kbd enter
        });
    });
});

I do not have a fixed idea on how it should look like, but i assume the best is to launch the debate here.