improve js specs, publish cached_files events