Skip to content

Commit 5d8cd2b

Browse files
committed
Fixed tests
1 parent 3506234 commit 5d8cd2b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

test/fixtures/specs.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"text": "page load time: {actual} should be less than {expected}",
1515
"max": 5000
1616
},
17+
"foo": {
18+
"bar": {
19+
"max": 100
20+
}
21+
},
1722
"score_keep-alive": {
1823
"min": 90
1924
},

test/helpers/nock-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var reqResMap = {
4949

5050
// sync
5151
'/runtest.php?url=http%3A%2F%2Ftwitter.com%2Fmarcelduran&f=json&pingback=http%3A%2F%2F127.0.0.1%3A8000%2Ftestdone': 'runTest.json',
52-
'/runtest.php?url=http%3A%2F%2Ftwitter.com%2Fmarcelduran&runs=3&fvonly=1&f=json&pingback=http%3A%2F%2F127.0.0.1%3A8000%2Ftestdone': 'runTestMultiRuns.json',
52+
'/runtest.php?url=http%3A%2F%2Ftwitter.com%2Fmarcelduran&runs=3&fvonly=1&medianMetric=TTFB&f=json&pingback=http%3A%2F%2F127.0.0.1%3A8000%2Ftestdone': 'runTestMultiRuns.json',
5353

5454
// not found / invalid
5555
'/testStatus.php?test=120816_V2_3': 'testStatusNotFound.json',

test/specs-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ describe('Example WebPageTest for Specs', function() {
3232
runs: 3,
3333
waitResults: '127.0.0.1:8000',
3434
medianMetric: 'TTFB',
35-
specs: '{"defaults":{"suiteName":"WPT test of test (not really an error)"},"median":{"firstView":{"render":800,"TTFB":600,"loadTime":4000}}}',
35+
specs: '{"defaults":{"suiteName":"WPT test of test (not really an error)"},"median":{"firstView":{"render":300,"TTFB":100,"loadTime":4000}}}',
3636
reporter: 'min'
3737
}, function(err) {
38-
assert.equal(err, 0);
38+
assert.equal(err, 2);
3939
done();
4040
});
4141
setTimeout(function() {
@@ -49,7 +49,7 @@ describe('Example WebPageTest for Specs', function() {
4949
specs: path.join(__dirname, './fixtures/specs.json'),
5050
reporter: 'spec'
5151
}, function(err) {
52-
assert.equal(err, 0);
52+
assert.equal(err, 1);
5353
done();
5454
});
5555
});

0 commit comments

Comments
 (0)