Closed Bug 1097962 Opened 11 years ago Closed 11 years ago

[costcontrol] costcontrol-test/unit/fte_test.js each test with JavaScript Error message

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

defect
Not set
normal

Tracking

(b2g-v2.2 fixed)

RESOLVED FIXED
2.1 S9 (21Nov)
Tracking Status
b2g-v2.2 --- fixed

People

(Reporter: sv99, Assigned: sv99)

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
salva
: review+
Details | Review
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0 Build ID: 20141106030201 Steps to reproduce: each test generate Error in the console FTE for non supported SIM ✓ [costcontrol-test/unit/fte_test.js] DATA_USAGE_ONLY mode initialized correctly (45ms) JavaScript error: app://costcontrol.gaiamobile.org/common/vendor/test-agent/test-agent.js, line 530: Error: Could not parse json: '[object: Object]'" Expected results: I suggests - problem in the function setupApplicationMode when i change test-agent.js - more readable Error message Responder.parse = function parse(json) { var data; try { data = (json.forEach) ? json : JSON.parse(json); } catch (e) { var output = ''; for (var key in json) { if (json.hasOwnProperty(key)) { output += key + ': ' + json[key]+'; '; } } throw new Error("Could not parse json: '" + JSON.stringify(json) + '"'); } return {event: data[0], data: data[1]}; }; then i see Error: Could not parse json: '{"type":"fte_ready","data":""}" ?? Message sended after test ended ??
Attached file Link to PR
Attachment #8521677 - Flags: review?(sfoster)
Attachment #8521677 - Flags: review?(sfoster) → review?(salva)
Comment on attachment 8521677 [details] [review] Link to PR Nice catch! Please correct the nit on GitHub.
Attachment #8521677 - Flags: review?(salva) → review+
Corrected
Keywords: checkin-needed
Assignee: nobody → sv99
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S9 (21Nov)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: