diff --git a/.vscode/launch.json b/.vscode/launch.json index 962bc7f..083ec19 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -38,7 +38,10 @@ "--user-data-dir=${workspaceFolder}/.vscode-test/user" ], "outFiles": ["${workspaceFolder}/out/test/**/*.js"], - "preLaunchTask": "npm: watch" + "preLaunchTask": "npm: watch", + "env": { + "CODE_TESTS_DATA_DIR": "${workspaceFolder}/.vscode-test/user" + } } ] } diff --git a/package-lock.json b/package-lock.json index 3f560ea..3fd50af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-profile-switcher", - "version": "0.2.0", + "version": "0.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -378,6 +378,16 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, + "cross-env": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz", + "integrity": "sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.5", + "is-windows": "^1.0.0" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -986,6 +996,12 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", diff --git a/package.json b/package.json index 5aff379..3932550 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,8 @@ "compile": "tsc -p ./", "watch": "tsc -watch -p ./", "postinstall": "node ./node_modules/vscode/bin/install", - "test": "npm run compile && node ./node_modules/vscode/bin/test", + "pretest": "npm run compile", + "test": "cross-env CODE_TESTS_DATA_DIR=./.test-profiles/tests/data node ./node_modules/vscode/bin/test", "test:ci": "node ./node_modules/vscode/bin/test", "package": "npx vsce package", "publish": "npx vsce publish", @@ -116,6 +117,7 @@ "@typescript-eslint/eslint-plugin": "^1.11.0", "@typescript-eslint/parser": "^1.11.0", "chai": "^4.2.0", + "cross-env": "^5.2.0", "eslint": "^6.0.1", "eslint-config-prettier": "^6.0.0", "mocha-multi-reporters": "^1.1.7",