Test commands how to configure nodemon?

"scripts": {
    "test:unit": "vue-cli-service test:unit"
}

this test:unit command can only be run once. If I want it to restart again and again, what should I do with node?

"test:unit": "nodemon -w tests/unit/*.test.js vue-cli-service test:unit"

I want it to automatically run the vue-cli-service test:unit command

when it detects changes to the test.js file in the tests/unit/ directory.
Feb.10,2022

"test:unit": "nodemon --watch tests/unit/*.test.js --exec 'vue-cli-service test:unit'"
Menu