Anyone arriving from China will have to show a negative COVID test taken within two days of leaving as China battles a rapid rise in cases.