update npm deps and fix some tests (fix #2287)