rewrite test in JXA
1.1.1