Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25093] Windows: Mocha test Titanium.Filesystem.File #createFile() and #deleteFile() test failure

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionFixed
Resolution Date2017-09-06T15:09:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsfailure-reviewed
ReporterEric Merriman
AssigneeKota Iguchi
Created2017-08-11T16:21:11.000+0000
Updated2017-10-04T14:35:15.000+0000

Description

Titanium.Filesystem.File #createFile() and #deleteFile() please investigate the failure. Please use https://github.com/ewanharris/titanium-mobile-mocha-suite/tree/TIMOB-24816 to find the related test You can use https://github.com/ewanharris/mocha-test to quickly debug (most) mocha tests)

Comments

  1. Ewan Harris 2017-08-24

    Test case is incorrect, resourcesDirectory should be read only. So we shouldn't write here (unless we're testing that it's read only), test case should use applicationDataDirectory
       it('#createFile() and #deleteFile()', function () {
       		var newFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'myfile');
       		should(newFile.exists()).be.false;
       		newFile.createFile();
       		should(newFile.exists()).be.true;
       		newFile.deleteFile();
       		should(newFile.exists()).be.false;
       	});
       
  2. Ewan Harris 2017-08-24

    Raises the question of why this isn't failing iOS and Android
  3. Kota Iguchi 2017-09-01

    https://github.com/appcelerator/titanium_mobile_windows/pull/1090
  4. Ewan Harris 2017-09-01

    [~kiguchi] Sorry I think I forgot to give you a heads up on these. I've been working on and off now to get Windows using titanium-mobile-mocha-suite, you can see what I've got done so far over at TIMOB-24816. 6.2.0 took precedence but I'm hoping to get back on it soon. My current plan is - finish up reviewing all the failures - finish my PR and get it merged into titanium-mobile-mocha-suite - update NMocha with the contents of that to get covered in the short term - bring in a similar process to titanium_mobile where we pull down titanium-mobile-mocha-suite and perform the tests in CI against that What do you think of that?
  5. Kota Iguchi 2017-09-01

    [~eharris] That sounds good to me (y) I haven't checked your PR for titanium-mobile-mocha-suite...I will keep reviewing those failures and will push fixes (in titanium_mobile_windows) when necessary.

JSON Source