Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should respond with a minimal empty view-model', () => {
expect(result.data).to.eql({
[emptyResponseHandler.viewModelEmptyKey]: true
});
});
});
);
cache.set('file-contents', cacheKey, template);
returnResult(template);
}
);
}
}
};
if (!component.oc.files.dataProvider) {
returnComponent(null, {});
} else {
const cacheKey = `${component.name}/${component.version}/server.js`;
const cached = cache.get('file-contents', cacheKey);
const domain = Domain.create();
const setEmptyResponse = emptyResponseHandler.contextDecorator(
returnComponent
);
const contextObj = {
acceptLanguage: acceptLanguageParser.parse(acceptLanguage),
baseUrl: conf.baseUrl,
env: conf.env,
params,
plugins: conf.plugins,
renderComponent: nestedRenderer.renderComponent,
renderComponents: nestedRenderer.renderComponents,
requestHeaders: options.headers,
setEmptyResponse,
staticPath: repository
.getStaticFilePath(component.name, component.version, '')
.replace('https:', ''),
setHeader: (header, value) => {