Operando detection of gas evolution from lithium-ion batteries