You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
I ran the unit test configuration on CI to check this problem wasn't just on my machine (#2310 ).
Steps to Reproduce:
clone the project
run npm install
run npm run vscode:prepublish
either run the Unit Tests config from the debug viewlet in the IDE or run from prompt npm node ./node_modules/mocha/bin/_mocha -u tdd --timeout 5000 --colors ./out/test/unit
The error from Travis is:
Error: Cannot find module 'vscode'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/travis/gopath/src/github.com/Microsoft/vscode-go/out/src/util.js:7:16)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/travis/gopath/src/github.com/Microsoft/vscode-go/out/test/unit/utils.test.js:7:16)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at /Users/travis/gopath/src/github.com/Microsoft/vscode-go/node_modules/mocha/lib/mocha.js:231:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/travis/gopath/src/github.com/Microsoft/vscode-go/node_modules/mocha/lib/mocha.js:228:14)
at Mocha.run (/Users/travis/gopath/src/github.com/Microsoft/vscode-go/node_modules/mocha/lib/mocha.js:536:10)
at Object.<anonymous> (/Users/travis/gopath/src/github.com/Microsoft/vscode-go/node_modules/mocha/bin/_mocha:573:18)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)
at bootstrap_node.js:507:3
It looks like the tests in the file 'utils.test.ts' are integration tests and should be moved out of the unit test folder (the utils.test.ts have the dependency on the vscode module). Also I think it would make sense to permanently add the the unit test run to Travis so this would get picked up if it happened again. There may be more to this in terms of a discussion around the value of unit tests vs integration tests when developing a VS Code extension.
The text was updated successfully, but these errors were encountered:
taseri
added a commit
to taseri/vscode-go
that referenced
this issue
Feb 10, 2019
The PR #2310 is to fix this issue. Note, people working on the extension project may need to clean the old utils.test.js file out of the out/test/unit folder to get a green unit test run.
I ran the unit test configuration on CI to check this problem wasn't just on my machine (#2310 ).
Steps to Reproduce:
npm install
npm run vscode:prepublish
npm node ./node_modules/mocha/bin/_mocha -u tdd --timeout 5000 --colors ./out/test/unit
The error from Travis is:
It looks like the tests in the file 'utils.test.ts' are integration tests and should be moved out of the unit test folder (the utils.test.ts have the dependency on the vscode module). Also I think it would make sense to permanently add the the unit test run to Travis so this would get picked up if it happened again. There may be more to this in terms of a discussion around the value of unit tests vs integration tests when developing a VS Code extension.
The text was updated successfully, but these errors were encountered: