webpagetest
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -37,3 +37,4 @@ /** | ||
googleCsi: 'google/google_csi.php', | ||
responseBody: 'response_body.php' | ||
responseBody: 'response_body.php', | ||
timeline: 'getTimeline.php' | ||
}; | ||
@@ -45,3 +46,2 @@ | ||
request: 'IEWTR.txt', | ||
timeline: 'timeline.json', | ||
netLog: 'netlog.txt', | ||
@@ -505,9 +505,9 @@ consoleLog: 'console_log.json', | ||
function getTimelineData(id, options, callback) { | ||
var query; | ||
callback = callback || options; | ||
options = options === callback ? undefined : options; | ||
query = setFilename({test: id}, options, true); | ||
return api.call(this, paths.gzip, callback, { | ||
test: id, | ||
file: setFilename(filenames.timeline, options) | ||
}, options); | ||
return api.call(this, paths.timeline, callback, query, options); | ||
} | ||
@@ -514,0 +514,0 @@ |
{ | ||
"name": "webpagetest", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "WebPageTest API wrapper for NodeJS", | ||
@@ -5,0 +5,0 @@ "author": "Marcel Duran <github@marcelduran.com> (http://github.com/marcelduran)", |
@@ -636,2 +636,3 @@ ## WebPageTest API Wrapper for NodeJS [![Build Status](https://secure.travis-ci.org/marcelduran/webpagetest-api.png?branch=master)](http://travis-ci.org/marcelduran/webpagetest-api) [![Dependencies Status](https://david-dm.org/marcelduran/webpagetest-api.png)](https://david-dm.org/marcelduran/webpagetest-api) | ||
* 0.2.3: Updated DevTools Timeline API url endpoint for timeline command | ||
* 0.2.2: Added response body command/method | ||
@@ -638,0 +639,0 @@ * 0.2.1: Added history, video, player, googleCsi commands and continuous option |
@@ -199,7 +199,7 @@ /** | ||
it('gets a timeline data input returns the API url', function(done) { | ||
it('gets a timeline data input returns the default API url', function(done) { | ||
exec(mock('timeline 120816_V2_2'), function(err, data) { | ||
if (err) return done(err); | ||
data = JSON.parse(data); | ||
assert.equal(data.url, wptServer + 'getgzip.php?test=120816_V2_2&file=1_timeline.json'); | ||
assert.equal(data.url, wptServer + 'getTimeline.php?test=120816_V2_2'); | ||
done(); | ||
@@ -209,2 +209,11 @@ }); | ||
it('gets a custom timeline data input returns the API url', function(done) { | ||
exec(mock('timeline 120816_V2_2 -r 2 --cached'), function(err, data) { | ||
if (err) return done(err); | ||
data = JSON.parse(data); | ||
assert.equal(data.url, wptServer + 'getTimeline.php?test=120816_V2_2&run=2&cached=1'); | ||
done(); | ||
}); | ||
}); | ||
it('gets a net log data input returns the API url', function(done) { | ||
@@ -211,0 +220,0 @@ exec(mock('netlog 120816_V2_2'), function(err, data) { |
@@ -207,6 +207,6 @@ /** | ||
it('gets timeline data request', function(done) { | ||
it('gets default timeline data request', function(done) { | ||
wpt.getTimelineData('120816_V2_2', {dryRun: true}, function (err, data) { | ||
if (err) return done(err); | ||
assert.equal(data.url, wptServer + 'getgzip.php?test=120816_V2_2&file=1_timeline.json'); | ||
assert.equal(data.url, wptServer + 'getTimeline.php?test=120816_V2_2'); | ||
done(); | ||
@@ -216,2 +216,14 @@ }); | ||
it('gets custom timeline data request', function(done) { | ||
wpt.getTimelineData('120816_V2_2', { | ||
run: 2, | ||
cached: true, | ||
dryRun: true | ||
}, function (err, data) { | ||
if (err) return done(err); | ||
assert.equal(data.url, wptServer + 'getTimeline.php?test=120816_V2_2&run=2&cached=1'); | ||
done(); | ||
}); | ||
}); | ||
it('gets net log data request', function(done) { | ||
@@ -218,0 +230,0 @@ wpt.getNetLogData('120816_V2_2', {dryRun: true}, function (err, data) { |
@@ -25,3 +25,3 @@ /** | ||
'/getgzip.php?test=120816_V2_2&file=1_IEWTR.txt': 'request.txt', | ||
'/getgzip.php?test=120816_V2_2&file=1_timeline.json': 'timeline.json', | ||
'/getTimeline.php?test=120816_V2_2': 'timeline.json', | ||
'/getgzip.php?test=120816_V2_2&file=1_netlog.txt': 'netLog.txt', | ||
@@ -28,0 +28,0 @@ '/getgzip.php?test=120816_V2_2&file=1_console_log.json': 'consoleLog.json', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24156980
53690
670