The Lassaigne's extract is boiled with conc HNO3 while testing for halogens. By doing so it :
Increases the concentration of ions
Decomposes Na2S and NaCN, if formed
Helps in the precipitation of AgCl
Increases the solubility product of AgCl
In case of Lassaigne's test of halogens, it is necessary to remove sodium cyanide and sodium sulphide from the sodium extract if nitrogen and sulphur are present. This is done by boiling the sodium extract with conc. .