Test: fix unit tests to work with middleware (#3468)

Conflicts:
	src/plugins/prettify/test.js