cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gert-Jan Braas <br...@steckelfisch.nl>
Subject RE: plugman testing
Date Wed, 26 Feb 2014 14:24:43 GMT

Jonathan Bond-Caron schreef op 2014-02-25 21:33:
> On Tue Feb 25 03:24 AM, Gert-Jan Braas wrote:
>> I've added some testing for firefoxos in plugman, but am a bit stuck 
>> on
>> the
>> uninstall handler.
>> 
>> test:
>>          describe('of <source-file> elements', function() {
>>              it('should remove stuff by calling common.removeFile',
>> function(done) {
>>                  var s = spyOn(common, 'removeFile');
>> 
>>                  install('firefoxos', temp, dummyplugin, plugins_dir, 
>> {})
>>                  .then(function() {
>>                      var source = copyArray(valid_source);
>>                      firefoxos['source-file'].uninstall(source[0], 
>> temp);
>>                      expect(s).toHaveBeenCalledWith(temp,
>> path.join('src', 'plugins', 'dummyplugin', 'DummyPlugin.js'));
>>                      done();
>>                   });
>>              });
>>          });
>> 
> 
> Jasmine runs synchronously, so you need to 'waitsFor' promise:
> 
...
> 
> This example might help:
> https://github.com/jbondc/cordova-plugman/blob/master/spec/install.spec.js#L115

Ok thanks.
Will look that up. First I will try to look what's going on thoug. The 
'waitFor' is not needed in
the tests for the other platforms, so I don't expect it to be for 
Firefoxos also. Correct me if I'm wrong.



-- 
====================
U ademt. Dat hebben wij gepatenteerd.
Mogen we even vangen?
-------------------------------------
Klaar met die sociale onzin? Installeer Ghostery: 
http://www.ghostery.com/
Of mooier nog: http://suicidemachine.org/

Mime
View raw message