Return a JSON blob in tests using components

Instead of returning a list of keys, the component resolver now returns a JSON blob of all the locals and their values in tests.