Update swap.js

The swap.js test file is updated for to check the new swap method behavior.

The swap method was updated without update the swap test file, so the swap test was launching validation errors.