Commit Graph

114 Commits

Author SHA1 Message Date
Jérémie Astori
c605f35335
Merge pull request #2019 from thelounge/yamanickill/save-queries
Save query channels in user.json
2018-01-30 19:27:28 -05:00
Al McKinlay
5cf24b80e6 Save query channels in user.json 2018-01-30 17:14:51 +00:00
Jérémie Astori
33d82287be
Do not statically serve the index template prior to rendering it
Without this, going to `https://thelounge.example.com/index.html` would return the raw file. This now excludes it from the `public` folder so it cannot be rendered as is.
Renaming the file is for good measure, to indicate that this HTML file must be templated. Because it is a straight rename with no modification, rebasing PRs on it should not be to painful, as git re-applies changes on renamed files.
2018-01-14 13:02:27 -05:00
Pavel Djundik
6675ced196 Store images with correct file extension 2018-01-03 13:33:52 +02:00
Pavel Djundik
349136f172 Do not match nicknames incorrectly as part of a bigger word
Fixes #1776
Fixes #1885
2017-12-27 20:44:59 +02:00
Pavel Djundik
06becc798f
Merge pull request #1874 from thelounge/astorije/handlebars-notEqual
Add a `notEqual` block helper for Handlebars and tests for `equal`
2017-12-22 12:28:15 +02:00
Jérémie Astori
371c5bcac2
Add a notEqual block helper for Handlebars 2017-12-21 22:09:08 -05:00
Jérémie Astori
6d053d65e7
Add tests for the Handlebars helper equal 2017-12-21 20:09:12 -05:00
Jérémie Astori
f975426c61
Rename the error handlers file at loading time 2017-12-21 18:23:54 -05:00
Pavel Djundik
e1ae339190 Add test for extended colors 2017-12-12 20:06:37 +02:00
Jérémie Astori
df2787d3e9
Add a --config / -c option to the start CLI command to arbitrarily override any configuration key
The biggest caveat is that JS code (such as functions) will not be interpreted as such, on purpose, for security precautions. If such thing is needed, then a configuration file must be used.
2017-12-11 23:48:52 -05:00
Jérémie Astori
b90c224a99
Define a raw logger to avoid using console.log, use it in extra help for environment variables, and add a test for this
This has multiple benefits:

- Respects the "Do not mock what you do not own" principle, instead we mock `log.raw` when necessary
- Lets us not re-assign `console.log`, which breaks as Mocha uses `console.log` as well
- Save and restore initial `log.raw` in test hooks (before/after), otherwise this would break Mocha/Chai
2017-12-11 23:48:51 -05:00
Pavel Djundik
4e6a29db35
Merge pull request #1797 from grissly-man/master
#1793 - implement reverse style
2017-12-10 16:15:40 +02:00
Jérémie Astori
c2243ed7b4
Remove dead code in tests, and fix a link test
I used `npm run coverage` while *not* excluding the test folder to detect dead code in our test folder, it is actually pretty useful to do so (as a one-shot, not to do that in our config).
Only remaining unreached path is L40 in `test/plugins/auth/ldap.js`, but it does seem to me that it might be useful in case of failures, so I preferred to leave it there.
2017-12-09 18:56:05 -05:00
Jérémie Astori
844ca1fbe6
Merge pull request #1811 from thelounge/astorije/improve-helper
Clean up path helpers, expand defaults location in `thelounge --help`, add tests for `expandHome`
2017-12-08 21:53:14 -05:00
Jérémie Astori
22237658cb
Add some unit tests for Helper.expandHome 2017-12-08 19:50:32 -05:00
Pavel Djundik
b391b87e29 Clean monospace and strikethrough formatters 2017-12-08 21:09:23 +02:00
Logan Griswold
fb94ad4205 implement reverse formatting with tests
implement reverse formatting with tests
2017-12-07 18:27:59 +00:00
Pavel Djundik
2d0ddfb2e8
Merge pull request #1778 from thelounge/xpaw/lazy-init
Heavily improve performance of "init" event
2017-12-05 12:03:01 +02:00
Logan Griswold
f07c1bef69
#1755 - implement monospace formatting with keybinding, tests, and help section 2017-12-03 15:10:46 -05:00
Logan Griswold
0643d3b4a3
#1754 - implement strikethrough formatting, client keybinding, tests, and help section 2017-12-03 15:10:34 -05:00
Pavel Djundik
5fc70397a9 Make sure all joins send filtered clone 2017-12-03 16:31:37 +02:00
Pavel Djundik
fe1c7612f5 Add tests for getFilteredClone methods 2017-12-03 16:31:37 +02:00
Pavel Djundik
52b234bdfc
Merge pull request #1770 from thelounge/astorije/client-tests
Add a bunch of client tests
2017-12-01 12:51:13 +02:00
Jérémie Astori
f368dcdc69
Add a bunch of client tests 2017-11-30 20:33:23 -05:00
Pavel Djundik
d770028da6 Fix duplicate user names not being found 2017-11-30 14:16:11 +02:00
Jérémie Astori
4ec10b922a
Clone instances of User in Msg to avoid unintentional mutations 2017-11-30 00:41:19 -05:00
Pavel Djundik
53968bf453
Merge pull request #1769 from thelounge/astorije/test-timeout
Increase timeout of server tests
2017-11-29 18:45:57 +02:00
Jérémie Astori
7de7292560
Increase timeout of server tests 2017-11-28 19:43:00 -05:00
Pavel Djundik
c9e340e153
Merge pull request #1761 from thelounge/astorije/slow-tests
Mark slow tests as such to reduce noise on test report
2017-11-28 11:43:24 +02:00
Jérémie Astori
624b3ebc18
Mark slow tests as such to reduce noise on test report 2017-11-27 18:47:19 -05:00
Jérémie Astori
03d6bf06ee
Avoid escaping quotes whenever possible (again)
Oops, I forgot to rebase and fix after merging a previous PR. I wish there was a way to enforce this with ESLint, but did not find any (only allow) :(
2017-11-27 18:40:23 -05:00
Jérémie Astori
b53f1719eb
Merge pull request #1749 from thelounge/astorije/avoid-escape-quotes
Avoid escaping quotes whenever possible
2017-11-27 12:57:55 -05:00
Max Leiter
3d31fa4686 Link nicks mentioned in messages 2017-11-27 09:10:56 -08:00
Jérémie Astori
287c3a8223
Avoid escaping quotes whenever possible
Our `.eslintrc.yml` configuration file already allows for avoiding escape (see [ESLint doc for `avoidEscape`](https://eslint.org/docs/rules/quotes#avoidescape)) so we might as well use it. We already use this in a few places I believe.
2017-11-26 17:34:28 -05:00
Jérémie Astori
ddc7ace78d
Bring test from ircmessageparser
See https://github.com/Bonuspunkt/ircmessageparser/pull/12/files#diff-e6c9a6bca996bc454cc244d17bfeda5c for reference (same test, linted)
2017-11-26 17:02:57 -05:00
Pavel Djundik
28b084af69 Fix #1413 - Handle hex colours when cleaning string 2017-11-22 16:03:59 +02:00
Pavel Djundik
adab03f730 Fix test 2017-11-19 19:43:43 +02:00
Pavel Djundik
0402554563 Move cleanIrcMessage to a separate file 2017-11-19 18:19:52 +02:00
Pavel Djundik
0f75c1a138 Change users array to be a Map 2017-11-19 11:35:15 +02:00
Jérémie Astori
1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00
Pavel Djundik
3f2a017583 Create public folder with webpack 2017-10-18 21:20:12 +03:00
Jérémie Astori
d1d871f351 Merge pull request #1617 from thelounge/greenkeeper/mocha-4.0.1
Update mocha to the latest version 🚀
2017-10-17 02:10:58 -04:00
Pavel Djundik
44acc5cb00 Teardown sockets in tests 2017-10-06 12:53:08 +03:00
Pavel Djundik
586a486418 Add tests for invalid urls 2017-10-06 12:25:26 +03:00
Pavel Djundik
7c9eedb820 Add hardcoded vapid key and a test for it
Hopefully fixes #1569
2017-09-25 11:46:15 +03:00
Jérémie Astori
b8399471b3
Enable ESLint no-console rule to avoid future mistakes 2017-09-17 21:50:21 -04:00
Elie Michel
32e1a36980 Generalize auth plugin fallback mechanism
@astorije this is for you ;)
https://github.com/thelounge/lounge/pull/1478#discussion_r136492534
2017-09-03 23:00:25 +02:00
Elie Michel
435e14669b Change string formatting style 2017-09-03 23:00:25 +02:00
Elie Michel
803cff92c8 Set public to true for websocket tests
A side effect of LDAP auth tests was breaking these other tests,
that should have already forced public instance in their pre-condition.
2017-09-03 23:00:24 +02:00