Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-14371] Anvil tests #4540

Conversation

shameer49
Copy link
Contributor

https://jira.appcelerator.org/browse/TIMOB-14371

fixes to TIMOB-14371

test: includes/includes
commonjs/commonjs
yahoo
network_httpclient

@srahim
Copy link
Contributor

srahim commented Sep 27, 2013

Why do you have two PR's with simillar commits ? Contains same code from #4499

@shameer49
Copy link
Contributor Author

Sorry for the inconvenience. Actually our machine had been crashed and we were unable to add new changes to the submitted branch. so we submitted two PR's for the same ticket.

@ghost ghost assigned pingwang2011 Oct 22, 2013
var b = require('commonjs/relative/submodule/b');
// Actual path from root directory("Resources") to relative/submodule -> Resources/suites/commonjs/relative/submodule
var a = require('/suites/commonjs/relative/submodule/a');//Path modified to correct absolute path
var b = require('/suites/commonjs/relative/submodule/b');//Path modified to correct absolute path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wrong the test is to check for relative pathing not absolute. Breaks functionality.

@lokeshchdhry
Copy link
Contributor

On iOS, for commonjs suite all test fail except "test_name_utils". On android all tests pass.
Similarly, for iOS in includesjs suite all test fail except "secondContextRequire" & "includeFromUrlWindow".

Changes to includejs, network_httpclient & yahoo suites looks good on both platforms.

@shameer49
Copy link
Contributor Author

In IOS there exist an issue that the IOS anvil does not work with any relative path but when we replace that to absolute path it works fine.That is why commonjs test fail in IOS.

@shameer49
Copy link
Contributor Author

The fix for include.js is not proper because its working fine on Titanium studio. We are still confused with this behavior of include function.

@shameer49
Copy link
Contributor Author

As per the doc. On iOS, all relative paths are currently interpreted as relative to the Resources directory, not to the current context.
http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Filesystem

@@ -1,7 +1,7 @@

exports.run = function(testRun, valueOf) {
valueOf(testRun, function() {
require('./submodule/a');
require('submodule/a');//Modified to invalid path to create exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should actually fail as there is a submodule/a exist. SInce our relative path does not work quite right this would pass. Just change it to something that doesnot exist like foo/bar

@skypanther
Copy link
Contributor

@shameer49 @srahim Is this still valid or can I close?

@ingo
Copy link
Contributor

ingo commented Feb 3, 2015

We're just going to fix this against the Mocha versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants