How to enable circleci parallel feature with cypress tests?

The circleci documentation is great but it doesnt mention anything about splitting cypress test cases across multiple machines with parallelism feature enabled.

I have cypress tests in my application and I have configured 4 parallel machines on circleci. But I can not figure out how to use circleci commands to split those test cases. I followed a blog post and tried the below code but didnt work. Any clue of how to make it both work?

steps:
        - run:
            name: Run cypress tests in Parallel
            command: |
              mkdir cypress/tmp
              mv $(circleci tests glob cypress/tests/**/*.spec.js | circleci tests split) cypress/tmp
              [ "$(ls -A cypress/tmp)" ] && npx cypress run --headless --browser electron

All 40 test cases started running across all 4 parallel machines instead of splitting the test cases. TIA

It should be a command line parameter, rather than moving them to a directory. We are using cypress-rails, and also yarn, but we pass in a cypress opts env variable, and that opts string is like --spec <path to test>, so I think you can just pass that to the command line you are using, like
export TEST_FILES="$(circleci tests glob cypress/tests/**/*.spec.js | circleci tests split)" && npm cypress run --headless --spec $TEST_FILES