This is the suggested approach.

package.json Approach
Simply toggle the dependencies from local to remote for the desired testing as is shown in the example below.

If testing:

  • Locally -- then swap in the source from "codeComment_local_dependencies" into "dependencies".
  • Remotely -- then swap in the source from "codeComment_local_dependencies" into "dependencies".
{
  "name": "js-vars-tests",
  "version": "1.0.0",
  "description": "variables tests",
  "keywords": [
    "vars-tests"
  ],
  "dependencies": {
    "@ashafoo/js-unit": "file:/Work/cincom/vse/Work/_newWork/XDOC/Version4/_Code/Node/1200-testing/1210-js-unit",
    "@ashafoo/js-vars": "file:/Work/cincom/vse/Work/_newWork/XDOC/Version4/_Code/Node/lib/js-vars",
    "@ashafoo/js-common": "file:/Work/cincom/vse/Work/_newWork/XDOC/Version4/_Code/Node/lib/js-common"
  },
  "codeComment_local_dependencies": {
    "@ashafoo/js-unit": "file:/Work/cincom/vse/Work/_newWork/XDOC/Version4/_Code/Node/1200-testing/1210-js-unit",
    "@ashafoo/js-vars": "file:/Work/cincom/vse/Work/_newWork/XDOC/Version4/_Code/Node/lib/js-vars",
    "@ashafoo/js-common": "file:/Work/cincom/vse/Work/_newWork/XDOC/Version4/_Code/Node/lib/js-common"
  },
  "codeComment_remote_dependencies": {
    "@ashafoo/js-unit": "^1.0.0",
    "@ashafoo/js-vars": "^1.0.0",
    "@ashafoo/js-common": "^1.0.0"
  }
}