MCPcopy Index your code
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / getSample

Function getSample

appengine/endpoints/test/app.test.js:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24const SAMPLE_PATH = path.join(__dirname, '../app.js');
25
26const getSample = () => {
27 const testApp = express();
28 const expressMock = sinon.stub().returns(testApp);
29 const app = proxyquire(SAMPLE_PATH, {
30 express: expressMock,
31 });
32
33 return {
34 app: app,
35 mocks: {
36 express: expressMock,
37 },
38 };
39};
40
41const stubConsole = function () {
42 sinon.stub(console, 'error');

Callers 1

app.test.jsFile · 0.70

Calls 1

expressFunction · 0.85

Tested by

no test coverage detected