As seen in rP20015 / D792, the JS simulation component tests don't freeze the template and entity property (while the ingame simulation components actually do, as proven by the bug fixed in rP19623).
The missing freeze allowed unintentional modification of the template object and messed up a test, which was later fixed in that commit.
To avoid repetition of that issue, we can now simply call deepfreeze on these two properties and mark the properties as non-configurable.
I didn't read and comprehend rP20015 in it's entirety, but I assume the two clone calls can be removed, as any modification by a user thereof would now fail loudly.
The function returns a read-only object, so if a clone is needed, it can still be done by the user.