Skip to content

Commit bdcf552

Browse files
mock express
1 parent a7e175d commit bdcf552

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
"coveralls": "^2.11.2",
128128
"deep-strict-equal": "^0.1.0",
129129
"dox": "^0.8.0",
130-
"express": "^4.13.4",
131130
"glob": "^5.0.9",
132131
"globby": "^3.0.1",
133132
"istanbul": "^0.3.5",

test/docs.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,17 @@ describe('documentation', function() {
111111
global: global
112112
};
113113

114+
function FakeExpress() {
115+
return {
116+
get: function() {}
117+
};
118+
}
119+
114120
fileDocBlocks.methods.forEach(function(method) {
115121
var code = method.examples.map(prop('code')).join('\n')
116122
.replace(/require\(\'gcloud\'\)/g, 'require(\'..\/\')')
117-
.replace(/require\(\'gcloud/g, 'require(\'..');
123+
.replace(/require\(\'gcloud/g, 'require(\'..')
124+
.replace('require(\'express\')', FakeExpress.toString());
118125

119126
var displayName = filename
120127
.replace('docs/json/master/', '')

0 commit comments

Comments
 (0)