How to use the serve-static.calledOnce function in serve-static

To help you get started, we’ve selected a few serve-static examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github springernature / shunter / tests / server / core / worker.js View on Github external
it('Should load the appropriate assets outside of production', function () {
		assert.isTrue(isProduction.calledOnce);
		assert.isTrue(connect().use.calledWith('/resources'));
		assert.isTrue(require('serve-static').calledOnce);
		assert.isTrue(require('serve-static').firstCall.calledWith('/path/to/tests'));
		assert.isTrue(renderer().assetServer.calledOnce);
	});

serve-static

Serve static files

MIT
Latest version published 3 months ago

Package Health Score

89 / 100
Full package analysis

Similar packages