Comments (6)
Answered in person: Run the quick-lint-js-test
executable directly to see output.
from quick-lint-js.
Hi @strager,
I would like to work on this issue, but I can't figure out how to run the tests. Can you give me any pointers? I did install the googletest library, and I also installed https://github.com/alepez/vim-gtest in vim. When I try to run the test file using that plugin, vim tells me permission is denied for ./test
. Am I on the right track?
from quick-lint-js.
For instructions on building and running the test suite, see this documentation: https://github.com/strager/quick-lint-js/blob/master/docs/BUILDING.md Specifically step 3 Run. The test suite is a single executable you can run from a command line.
I did install the googletest library
You don't need to install googletest yourself. It's packaged in quick-lint-js' repository.
I also installed https://github.com/alepez/vim-gtest in vim.
I haven't used or heard of this plugin, so I don't know if it will work with quick-lint-js. I'd run the tests without this plugin first to ensure quick-lint-js' build system is configured correctly.
from quick-lint-js.
Thank you for the help. I looked around but I guess I didn't find the building file earlier.
I look forward to contributing 👍
from quick-lint-js.
Is there any way to make the test failure output more descriptive?
I'm not all that familiar with C++, so I started by copying another test that should be very similar (I have not changed the assertion at all yet):
TEST(test_lex, lex_number_with_double_underscore) {
{
error_collector v;
padded_string input(u8"123__000");
lexer l(&input, &v);
EXPECT_EQ(l.peek().type, token_type::number);
l.skip();
EXPECT_EQ(l.peek().type, token_type::end_of_file);
EXPECT_THAT(v.errors, ElementsAre(ERROR_TYPE_FIELD(
error_unexpected_characters_in_number, characters,
offsets_matcher(&input, 3, 7))));
}
}
And this is the failing output:
ninja: Entering directory `build'
ninja: no work to do.
ninja: Entering directory `build'
[0/1] Running tests...
Test project /Users/brandoncc/dev/quick-lint-js/build
Start 1: quick-lint-js-test
1/1 Test #1: quick-lint-js-test ...............***Failed 0.04 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.04 sec
The following tests FAILED:
1 - quick-lint-js-test (Failed)
Errors while running CTest
FAILED: CMakeFiles/test.util
cd /Users/brandoncc/dev/quick-lint-js/build && /usr/local/Cellar/cmake/3.17.3/bin/ctest --force-new-ctest-process
ninja: build stopped: subcommand failed.
Is there any way to make it say what the failure was, and why? Since I don't know C++ well, I am hoping to write this in a TDD fashion so it will lead me to the correct answer.
from quick-lint-js.
In commit da23683 I reworded the documentation. Hopefully it should be easier to follow.
from quick-lint-js.
Related Issues (20)
- feature idea: parse git merge conflicts HOT 3
- Benchmark: add Oxc linter as a comparison HOT 2
- 10$: JS string decoding routine
- feature request(cli): option to pass file containing filenames to lint HOT 8
- feature request(cli): lint directories HOT 2
- incorrect parse of '(): RT<T>=> { throw ''; }' HOT 1
- ERROR E0358 show's 404 HOT 2
- Method overrides defined with comma at the end of the line show error HOT 3
- declares globals and exports in .d.ts file not recognized HOT 6
- re-exporting type under the same name in declare global shows error HOT 2
- config: ignore specific rules HOT 8
- 12$: warn on combining characters in regexp character classes HOT 3
- Preact diagnostics
- feature request: treat Flow files as TypeScript HOT 2
- E0214 with types from lib.dom in typescript project HOT 3
- Arch Linux deploy is broken HOT 2
- VSCode extension crashes the extension host at extension activation HOT 5
- GPG key is expired
- 12$: VS Code extension double-lints sometimes
- CLI: treat quick-lint-js.config as a config file, not a .js file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quick-lint-js.