-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests & tslint for src/addons directory #1754
Run tests & tslint for src/addons directory #1754
Conversation
tsconfig.json
Outdated
@@ -20,8 +20,5 @@ | |||
"include": [ | |||
"src/**/*", | |||
"typings/xterm.d.ts" | |||
], | |||
"exclude": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't not exclude this as the source is part of a different tsconfig.json. The tests are meant to be included here:
Lines 25 to 30 in 37972aa
const TEST_PATHS = [ | |
`${outDir}/*test.js`, | |
`${outDir}/**/*test.js`, | |
`${outDir}/*integration.js`, | |
`${outDir}/**/*integration.js` | |
]; |
yarn test
runs gulp mocha
which picks up these source files. Maybe there's a problem with the gulp task? Did you have the addons built before you ran yarn test (yarn watch-addons
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reproduce this, I've deleted build/
, lib/
directories and run yarn build
and yarn test
.
It seems that the issue is with only src/search.test.js
that gets lost somewhere. I've installed gulp plugin to output the file paths that gulp.src()
emits in the mocha
task:
[22:03:00] Using gulpfile ~/src/xterm.js/gulpfile.js
[22:03:00] Starting 'mocha'...
[22:03:00] Using ./lib/Buffer.test.js
[22:03:00] Using ./lib/BufferLine.test.js
[22:03:00] Using ./lib/BufferSet.test.js
[22:03:00] Using ./lib/CharWidth.test.js
[22:03:00] Using ./lib/CompositionHelper.test.js
[22:03:00] Using ./lib/EscapeSequenceParser.test.js
[22:03:00] Using ./lib/InputHandler.test.js
[22:03:00] Using ./lib/Linkifier.test.js
[22:03:00] Using ./lib/SelectionManager.test.js
[22:03:00] Using ./lib/SelectionModel.test.js
[22:03:00] Using ./lib/Terminal.test.js
[22:03:00] Using ./lib/common/CircularList.test.js
[22:03:00] Using ./lib/common/EventEmitter.test.js
[22:03:00] Using ./lib/common/Lifecycle.test.js
[22:03:00] Using ./lib/public/Terminal.test.js
[22:03:00] Using ./lib/handlers/Clipboard.test.js
[22:03:00] Using ./lib/renderer/CharacterJoinerRegistry.test.js
[22:03:00] Using ./lib/renderer/ColorManager.test.js
[22:03:00] Using ./lib/renderer/GridCache.test.js
[22:03:00] Using ./lib/utils/Clone.test.js
[22:03:00] Using ./lib/utils/MouseHelper.test.js
[22:03:00] Using ./lib/utils/TestUtils.test.js
[22:03:00] Using ./lib/ui/CharMeasure.test.js
[22:03:00] Using ./lib/addons/fit/fit.test.js
[22:03:00] Using ./lib/addons/fullscreen/fullscreen.test.js
[22:03:00] Using ./lib/addons/attach/attach.test.js
[22:03:00] Using ./lib/addons/terminado/terminado.test.js
[22:03:00] Using ./lib/addons/winptyCompat/winptyCompat.test.js
[22:03:00] Using ./lib/addons/zmodem/zmodem.test.js
[22:03:00] Using ./lib/addons/webLinks/webLinks.test.js
[22:03:00] Using ./lib/core/input/Keyboard.test.js
[22:03:00] Using ./lib/renderer/atlas/LRUMap.test.js
[22:03:00] Using ./lib/renderer/dom/DomRendererRowFactory.test.js
[22:03:00] Using ./lib/Terminal.integration.js
@@ -18,8 +18,5 @@ | |||
}, | |||
"include": [ | |||
"**/*.ts" | |||
], | |||
"exclude": [ | |||
"**/*.test.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could reproduce as well and it looks like this was the problem, Can you undo the change to <root>/tsconfig.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I squashed the commits, the change in <root>/tsconfig.json
is no longer there.
447e9e0
to
3f3263c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vladimirZe! Sorry about the delay 😃
Long story short, I wanted to work on a bug but I noticed that tests and the tslint are not running for
src/addons
directory (intentionally?), this is my attempt to fix thissrc/addons
fromexclude
from tsconfig.js